Skip to content

Commit 54ddb09

Browse files
committed
updated test model (reqres API key)
1 parent bf0f7e7 commit 54ddb09

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/models/http_request_models.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const httpRequestModelGet2 = HttpRequestModel(
1515
],
1616
);
1717

18-
/// GET request model with override query params
18+
/// GET request model with query param having multiple values
1919
const httpRequestModelGet3 = HttpRequestModel(
2020
url: 'https://api.apidash.dev/country/data?code=US',
2121
method: HTTPVerb.get,
@@ -336,6 +336,9 @@ const httpRequestModelPost10 = HttpRequestModel(
336336
const httpRequestModelPut1 = HttpRequestModel(
337337
method: HTTPVerb.put,
338338
url: 'https://reqres.in/api/users/2',
339+
headers:[
340+
NameValueModel(name: 'x-api-key', value: 'reqres-free-v1')
341+
],
339342
bodyContentType: ContentType.json,
340343
body: r"""{
341344
"name": "morpheus",
@@ -348,6 +351,9 @@ const httpRequestModelPatch1 = HttpRequestModel(
348351
method: HTTPVerb.patch,
349352
url: 'https://reqres.in/api/users/2',
350353
bodyContentType: ContentType.json,
354+
headers:[
355+
NameValueModel(name: 'x-api-key', value: 'reqres-free-v1')
356+
],
351357
body: r"""{
352358
"name": "marfeus",
353359
"job": "accountant"
@@ -357,6 +363,9 @@ const httpRequestModelPatch1 = HttpRequestModel(
357363
/// Basic DELETE request model
358364
const httpRequestModelDelete1 = HttpRequestModel(
359365
method: HTTPVerb.delete,
366+
headers:[
367+
NameValueModel(name: 'x-api-key', value: 'reqres-free-v1')
368+
],
360369
url: 'https://reqres.in/api/users/2',
361370
);
362371

@@ -365,6 +374,9 @@ const httpRequestModelDelete2 = HttpRequestModel(
365374
method: HTTPVerb.delete,
366375
url: 'https://reqres.in/api/users/2',
367376
bodyContentType: ContentType.json,
377+
headers:[
378+
NameValueModel(name: 'x-api-key', value: 'reqres-free-v1')
379+
],
368380
body: r"""{
369381
"name": "marfeus",
370382
"job": "accountant"

0 commit comments

Comments
 (0)