http icon indicating copy to clipboard operation
http copied to clipboard

To handle multi-VALUE fields in a POST request

Open warcayac opened this issue 4 years ago • 0 comments

I have this request working on a Linux terminal:

curl -X POST "https://my-api.plantnet.org/v2/identify/all?api-key=11111111111111111111" -H "accept: application/json" -F "organs=flower" -F "organs=leaf" -F "images=@images/image_1.jpeg" -F "images=@images/image_2.jpeg"

As you may have seen there are two multi-value fields, organs and images, one is for String objects and the another is for File objects.

I'm trying to recreate this command by using http package with Dart. I've used post and MultipartRequest methods but these methods does apparently not support fields with multiple values like the request showed above. I've googled and posted questions in forums, NO ANSWERS. So I must suppose this feature is not implemented for this package, therefore I request you can implement it please.

PS: in other languages like Javascript is possible to send fields with multi-values.

warcayac avatar Mar 04 '21 17:03 warcayac