@@ -230,98 +230,98 @@ const requestModelPost3 = RequestModel(
230
230
/// POST request model with multipart body(text)
231
231
const requestModelPost4 = RequestModel (
232
232
id: 'post4' ,
233
- url: 'https://oshi.at ' ,
233
+ url: 'https://api.apidash.dev/io/form ' ,
234
234
method: HTTPVerb .post,
235
235
requestFormDataList: [
236
- FormDataModel (
237
- name: "text" , value: "some textual string" , type: FormDataType .file)
236
+ FormDataModel (name: "text" , value: "API" , type: FormDataType .text),
237
+ FormDataModel (name: "sep" , value: "|" , type: FormDataType .text),
238
+ FormDataModel (name: "times" , value: "3" , type: FormDataType .text),
238
239
],
239
240
requestBodyContentType: ContentType .formdata,
240
241
);
241
242
242
243
/// POST request model with multipart body and headers
243
244
const requestModelPost5 = RequestModel (
244
245
id: 'post5' ,
245
- url: 'https://oshi.at ' ,
246
+ url: 'https://api.apidash.dev/io/form ' ,
246
247
method: HTTPVerb .post,
247
248
requestFormDataList: [
248
- FormDataModel (
249
- name: "text" , value: "some textual string" , type: FormDataType .text)
249
+ FormDataModel (name: "text" , value: "API" , type: FormDataType .text),
250
+ FormDataModel (name: "sep" , value: "|" , type: FormDataType .text),
251
+ FormDataModel (name: "times" , value: "3" , type: FormDataType .text),
250
252
],
251
253
requestHeaders: [
252
254
NameValueModel (name: 'User-Agent' , value: 'Test Agent' ),
253
255
],
254
256
requestBodyContentType: ContentType .formdata,
255
257
);
256
258
257
- /// POST request model with multipart body(file)
259
+ /// POST request model with multipart body(text, file)
258
260
const requestModelPost6 = RequestModel (
259
261
id: 'post6' ,
260
- url: 'https://oshi.at ' ,
262
+ url: 'https://api.apidash.dev/io/img ' ,
261
263
method: HTTPVerb .post,
262
264
requestFormDataList: [
263
- FormDataModel (name: "f" , value: "/path/to/file" , type: FormDataType .file)
265
+ FormDataModel (name: "token" , value: "xyz" , type: FormDataType .text),
266
+ FormDataModel (
267
+ name: "imfile" , value: "/Documents/up/1.png" , type: FormDataType .file),
264
268
],
265
269
requestBodyContentType: ContentType .formdata,
266
270
);
267
271
268
272
/// POST request model with multipart body and requestBody (the requestBody shouldn't be in codegen)
269
273
const requestModelPost7 = RequestModel (
270
274
id: 'post7' ,
271
- url: 'https://oshi.at ' ,
275
+ url: 'https://api.apidash.dev/io/img ' ,
272
276
method: HTTPVerb .post,
273
277
requestBody: r"""{
274
278
"text": "I LOVE Flutter"
275
279
}""" ,
276
280
requestFormDataList: [
281
+ FormDataModel (name: "token" , value: "xyz" , type: FormDataType .text),
277
282
FormDataModel (
278
- name: "text " , value: "some textual string " , type: FormDataType .text)
283
+ name: "imfile " , value: "/Documents/up/1.png " , type: FormDataType .file),
279
284
],
280
285
requestBodyContentType: ContentType .formdata,
281
286
);
282
287
283
288
/// POST request model with multipart body and requestParams
284
289
const requestModelPost8 = RequestModel (
285
290
id: 'post8' ,
286
- url: 'https://oshi.at ' ,
291
+ url: 'https://api.apidash.dev/io/form ' ,
287
292
method: HTTPVerb .post,
288
293
requestFormDataList: [
289
- FormDataModel (
290
- name: "text" , value: "some textual string" , type: FormDataType .text)
294
+ FormDataModel (name: "text" , value: "API" , type: FormDataType .text),
295
+ FormDataModel (name: "sep" , value: "|" , type: FormDataType .text),
296
+ FormDataModel (name: "times" , value: "3" , type: FormDataType .text),
291
297
],
292
298
requestParams: [
293
- NameValueModel (name: 'num' , value: '8700000' ),
294
- NameValueModel (name: 'digits' , value: '3' ),
295
- NameValueModel (name: 'system' , value: 'SS' ),
296
- NameValueModel (name: 'add_space' , value: 'true' ),
297
- NameValueModel (name: 'trailing_zeros' , value: 'true' ),
299
+ NameValueModel (name: 'size' , value: '2' ),
300
+ NameValueModel (name: 'len' , value: '3' ),
298
301
],
299
302
requestBodyContentType: ContentType .formdata,
300
303
);
301
304
302
305
/// POST request model with multipart body(file and text), requestParams, requestHeaders and requestBody
303
306
const requestModelPost9 = RequestModel (
304
307
id: 'post9' ,
305
- url: 'https://oshi.at ' ,
308
+ url: 'https://api.apidash.dev/io/img ' ,
306
309
method: HTTPVerb .post,
307
310
requestBody: r"""{
308
311
"text": "I LOVE Flutter"
309
312
}""" ,
310
313
requestFormDataList: [
314
+ FormDataModel (name: "token" , value: "xyz" , type: FormDataType .text),
311
315
FormDataModel (
312
- name: "text" , value: "some textual string" , type: FormDataType .text),
313
- FormDataModel (name: "f" , value: "/path/to/file" , type: FormDataType .file)
316
+ name: "imfile" , value: "/Documents/up/1.png" , type: FormDataType .file),
314
317
],
315
318
requestParams: [
316
- NameValueModel (name: 'num' , value: '8700000' ),
317
- NameValueModel (name: 'digits' , value: '3' ),
318
- NameValueModel (name: 'system' , value: 'SS' ),
319
- NameValueModel (name: 'add_space' , value: 'true' ),
320
- NameValueModel (name: 'trailing_zeros' , value: 'true' ),
319
+ NameValueModel (name: 'size' , value: '2' ),
320
+ NameValueModel (name: 'len' , value: '3' ),
321
321
],
322
322
requestHeaders: [
323
323
NameValueModel (name: 'User-Agent' , value: 'Test Agent' ),
324
- NameValueModel (name: 'Content-Type ' , value: 'multipart/form-data ' ),
324
+ NameValueModel (name: 'Keep-Alive ' , value: 'true ' ),
325
325
],
326
326
requestBodyContentType: ContentType .formdata,
327
327
);
0 commit comments