Skip to content

Commit 4be8f6a

Browse files
committed
Update
1 parent cbe8dc3 commit 4be8f6a

File tree

3 files changed

+137
-140
lines changed

3 files changed

+137
-140
lines changed

packages/har/example/har_example.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void main() {
77
"log": {
88
"version": "1.2",
99
"creator": {
10-
"name": "Postman",
10+
"name": "Client Name",
1111
"version": "v8.x.x"
1212
},
1313
"entries": [
@@ -163,7 +163,7 @@ void main() {
163163
var collectionJson = {
164164
"log": {
165165
"version": "1.2",
166-
"creator": {"name": "Postman", "version": "v8.x.x"},
166+
"creator": {"name": "Client Name", "version": "v8.x.x"},
167167
"entries": [
168168
{
169169
"startedDateTime": "2025-03-25T12:00:00.000Z",

packages/har/test/collection_examples/collection_apidash.dart

Lines changed: 134 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var collectionJsonStr = r'''
33
"log": {
44
"version": "1.2",
55
"creator": {
6-
"name": "Postman",
6+
"name": "Client Name",
77
"version": "v8.x.x"
88
},
99
"entries": [
@@ -184,149 +184,146 @@ var collectionJsonStr = r'''
184184
}''';
185185

186186
var collectionJson = {
187-
"log": {
188-
"version": "1.2",
189-
"creator": {
190-
"name": "Postman",
191-
"version": "v8.x.x"
187+
"log": {
188+
"version": "1.2",
189+
"creator": {"name": "Client Name", "version": "v8.x.x"},
190+
"entries": [
191+
{
192+
"startedDateTime": "2025-03-25T12:00:00.000Z",
193+
"time": 100,
194+
"request": {
195+
"method": "GET",
196+
"url": "https://api.apidash.dev",
197+
"headers": [],
198+
"queryString": [],
199+
"bodySize": 0
192200
},
193-
"entries": [
194-
{
195-
"startedDateTime": "2025-03-25T12:00:00.000Z",
196-
"time": 100,
197-
"request": {
198-
"method": "GET",
199-
"url": "https://api.apidash.dev",
200-
"headers": [],
201-
"queryString": [],
202-
"bodySize": 0
203-
},
204-
"response": {
205-
"status": 200,
206-
"statusText": "OK",
207-
"headers": [],
208-
"bodySize": 0
209-
}
201+
"response": {
202+
"status": 200,
203+
"statusText": "OK",
204+
"headers": [],
205+
"bodySize": 0
206+
}
207+
},
208+
{
209+
"startedDateTime": "2025-03-25T12:01:00.000Z",
210+
"time": 150,
211+
"request": {
212+
"method": "GET",
213+
"url": "https://api.apidash.dev/country/data?code=US",
214+
"headers": [],
215+
"queryString": [
216+
{"name": "code", "value": "US"}
217+
],
218+
"bodySize": 0
210219
},
211-
{
212-
"startedDateTime": "2025-03-25T12:01:00.000Z",
213-
"time": 150,
214-
"request": {
215-
"method": "GET",
216-
"url": "https://api.apidash.dev/country/data?code=US",
217-
"headers": [],
218-
"queryString": [
219-
{"name": "code", "value": "US"}
220-
],
221-
"bodySize": 0
222-
},
223-
"response": {
224-
"status": 200,
225-
"statusText": "OK",
226-
"headers": [],
227-
"bodySize": 0
228-
}
220+
"response": {
221+
"status": 200,
222+
"statusText": "OK",
223+
"headers": [],
224+
"bodySize": 0
225+
}
226+
},
227+
{
228+
"startedDateTime": "2025-03-25T12:02:00.000Z",
229+
"time": 200,
230+
"request": {
231+
"method": "GET",
232+
"url":
233+
"https://api.apidash.dev/humanize/social?num=8700000&digits=3&system=SS&add_space=true&trailing_zeros=true",
234+
"headers": [],
235+
"queryString": [
236+
{"name": "num", "value": "8700000"},
237+
{"name": "digits", "value": "3"},
238+
{"name": "system", "value": "SS"},
239+
{"name": "add_space", "value": "true"},
240+
{"name": "trailing_zeros", "value": "true"}
241+
],
242+
"bodySize": 0
229243
},
230-
{
231-
"startedDateTime": "2025-03-25T12:02:00.000Z",
232-
"time": 200,
233-
"request": {
234-
"method": "GET",
235-
"url":
236-
"https://api.apidash.dev/humanize/social?num=8700000&digits=3&system=SS&add_space=true&trailing_zeros=true",
237-
"headers": [],
238-
"queryString": [
239-
{"name": "num", "value": "8700000"},
240-
{"name": "digits", "value": "3"},
241-
{"name": "system", "value": "SS"},
242-
{"name": "add_space", "value": "true"},
243-
{"name": "trailing_zeros", "value": "true"}
244-
],
245-
"bodySize": 0
246-
},
247-
"response": {
248-
"status": 200,
249-
"statusText": "OK",
250-
"headers": [],
251-
"bodySize": 0
244+
"response": {
245+
"status": 200,
246+
"statusText": "OK",
247+
"headers": [],
248+
"bodySize": 0
249+
}
250+
},
251+
{
252+
"startedDateTime": "2025-03-25T12:03:00.000Z",
253+
"time": 300,
254+
"request": {
255+
"method": "POST",
256+
"url": "https://api.apidash.dev/case/lower",
257+
"headers": [],
258+
"queryString": [],
259+
"bodySize": 50,
260+
"postData": {
261+
"mimeType": "application/json",
262+
"text": "{ \"text\": \"I LOVE Flutter\" }"
252263
}
253264
},
254-
{
255-
"startedDateTime": "2025-03-25T12:03:00.000Z",
256-
"time": 300,
257-
"request": {
258-
"method": "POST",
259-
"url": "https://api.apidash.dev/case/lower",
260-
"headers": [],
261-
"queryString": [],
262-
"bodySize": 50,
263-
"postData": {
264-
"mimeType": "application/json",
265-
"text": "{ \"text\": \"I LOVE Flutter\" }"
266-
}
267-
},
268-
"response": {
269-
"status": 200,
270-
"statusText": "OK",
271-
"headers": [],
272-
"bodySize": 0
265+
"response": {
266+
"status": 200,
267+
"statusText": "OK",
268+
"headers": [],
269+
"bodySize": 0
270+
}
271+
},
272+
{
273+
"startedDateTime": "2025-03-25T12:04:00.000Z",
274+
"time": 350,
275+
"request": {
276+
"method": "POST",
277+
"url": "https://api.apidash.dev/io/form",
278+
"headers": [
279+
{"name": "User-Agent", "value": "Test Agent"}
280+
],
281+
"queryString": [],
282+
"bodySize": 100,
283+
"postData": {
284+
"mimeType": "multipart/form-data",
285+
"params": [
286+
{"name": "text", "value": "API", "contentType": "text/plain"},
287+
{"name": "sep", "value": "|", "contentType": "text/plain"},
288+
{"name": "times", "value": "3", "contentType": "text/plain"}
289+
]
273290
}
274291
},
275-
{
276-
"startedDateTime": "2025-03-25T12:04:00.000Z",
277-
"time": 350,
278-
"request": {
279-
"method": "POST",
280-
"url": "https://api.apidash.dev/io/form",
281-
"headers": [
282-
{"name": "User-Agent", "value": "Test Agent"}
283-
],
284-
"queryString": [],
285-
"bodySize": 100,
286-
"postData": {
287-
"mimeType": "multipart/form-data",
288-
"params": [
289-
{"name": "text", "value": "API", "contentType": "text/plain"},
290-
{"name": "sep", "value": "|", "contentType": "text/plain"},
291-
{"name": "times", "value": "3", "contentType": "text/plain"}
292-
]
293-
}
294-
},
295-
"response": {
296-
"status": 200,
297-
"statusText": "OK",
298-
"headers": [],
299-
"bodySize": 0
292+
"response": {
293+
"status": 200,
294+
"statusText": "OK",
295+
"headers": [],
296+
"bodySize": 0
297+
}
298+
},
299+
{
300+
"startedDateTime": "2025-03-25T12:05:00.000Z",
301+
"time": 400,
302+
"request": {
303+
"method": "POST",
304+
"url": "https://api.apidash.dev/io/img",
305+
"headers": [],
306+
"queryString": [],
307+
"bodySize": 150,
308+
"postData": {
309+
"mimeType": "multipart/form-data",
310+
"params": [
311+
{"name": "token", "value": "xyz", "contentType": "text/plain"},
312+
{
313+
"name": "imfile",
314+
"fileName": "hire AI.jpeg",
315+
"contentType": "image/jpeg"
316+
}
317+
]
300318
}
301319
},
302-
{
303-
"startedDateTime": "2025-03-25T12:05:00.000Z",
304-
"time": 400,
305-
"request": {
306-
"method": "POST",
307-
"url": "https://api.apidash.dev/io/img",
308-
"headers": [],
309-
"queryString": [],
310-
"bodySize": 150,
311-
"postData": {
312-
"mimeType": "multipart/form-data",
313-
"params": [
314-
{"name": "token", "value": "xyz", "contentType": "text/plain"},
315-
{
316-
"name": "imfile",
317-
"fileName": "hire AI.jpeg",
318-
"contentType": "image/jpeg"
319-
}
320-
]
321-
}
322-
},
323-
"response": {
324-
"status": 200,
325-
"statusText": "OK",
326-
"headers": [],
327-
"bodySize": 0
328-
}
320+
"response": {
321+
"status": 200,
322+
"statusText": "OK",
323+
"headers": [],
324+
"bodySize": 0
329325
}
330-
]
331-
}
332-
};
326+
}
327+
]
328+
}
329+
};

packages/har/test/models/collection_apidash_model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:har/models/models.dart';
33
var collectionApiDashModel = HarLog(
44
log: Log(
55
version: "1.2",
6-
creator: Creator(name: "Postman", version: "v8.x.x"),
6+
creator: Creator(name: "Client Name", version: "v8.x.x"),
77
entries: [
88
Entry(
99
startedDateTime: "2025-03-25T12:00:00.000Z",

0 commit comments

Comments
 (0)