mirror of
https://github.com/foss42/apidash.git
synced 2025-12-12 16:17:34 +08:00
121 lines
3.2 KiB
Dart
121 lines
3.2 KiB
Dart
import 'package:har_parser/models/models.dart';
|
|
|
|
var collectionApiDashModel = HarLog(
|
|
log: Log(
|
|
version: "1.2",
|
|
creator: Creator(name: "Sample HAR Creator", version: "1.0"),
|
|
entries: [
|
|
Entry(
|
|
startedDateTime: "2024-02-23T08:00:00.000Z",
|
|
time: 50,
|
|
request: Request(
|
|
method: "GET",
|
|
url: "https://api.example.com/users",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
queryString: [],
|
|
postData: {},
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
response: Response(
|
|
status: 200,
|
|
statusText: "OK",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
content: Content(size: 100, mimeType: "application/json"),
|
|
redirectURL: "",
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
),
|
|
Entry(
|
|
startedDateTime: "2024-02-23T08:05:00.000Z",
|
|
time: 70,
|
|
request: Request(
|
|
method: "POST",
|
|
url: "https://api.example.com/login",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
queryString: [],
|
|
postData: {
|
|
"mimeType": "application/json",
|
|
"text": '{"username":"user","password":"pass"}',
|
|
},
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
response: Response(
|
|
status: 200,
|
|
statusText: "OK",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
content: Content(size: 50, mimeType: "application/json"),
|
|
redirectURL: "",
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
),
|
|
Entry(
|
|
startedDateTime: "2024-02-23T08:10:00.000Z",
|
|
time: 60,
|
|
request: Request(
|
|
method: "GET",
|
|
url: "https://api.example.com/products",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
queryString: [],
|
|
postData: {},
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
response: Response(
|
|
status: 200,
|
|
statusText: "OK",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
content: Content(size: 200, mimeType: "application/json"),
|
|
redirectURL: "",
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
),
|
|
Entry(
|
|
startedDateTime: "2024-02-23T08:15:00.000Z",
|
|
time: 80,
|
|
request: Request(
|
|
method: "PUT",
|
|
url: "https://api.example.com/products/123",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
queryString: [],
|
|
postData: {
|
|
"mimeType": "application/json",
|
|
"text": '{"name":"New Product","price":50}',
|
|
},
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
response: Response(
|
|
status: 200,
|
|
statusText: "OK",
|
|
httpVersion: "HTTP/1.1",
|
|
cookies: [],
|
|
headers: [],
|
|
content: Content(size: 50, mimeType: "application/json"),
|
|
redirectURL: "",
|
|
headersSize: -1,
|
|
bodySize: -1,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|