'patient_age': patientAge!,
'test_date': testdate!,
"test_id[]": testIDs[0].toString(),
The api i got takes "test_id[]" repeatedly for list of test ids in body and in postman the api testing is working fine.
But when I try this test_id[] in body it shows map doesn’t accept same key. How can I send a list in this pattern?
2
Answers
You should try:
This is not supported in HttpClient from the
http
package (c.f. https://github.com/dart-lang/http/issues/47).However, it seems that it’s possible using the
dio
package: https://pub.dev/documentation/dio/latest/dio/ListFormat.html