mapping - Android retrofit 2 send array as field -


 @formurlencoded      @post("mobile/order")  call<orderresult> oredertaxi(         @field("user_id") integer user_id,         @field("driver_id") integer driver_id,         @field ("locations") list<string> location); 

retrofit 2 maps elements of array , create key_value pairs `driver_id: 8

locations: 40.7830904,43.861694

locations: 40.789281071949176,43.8663412258029

locations: 40.79531973066005,43.86150989681482

locations: 40.79855839824006,43.85658267885446

but have send 1 jsonarray `

locations:[ 40.7830904,43.861694

40.789281071949176,43.8663412258029

40.79531973066005,43.86150989681482 ]

help please..


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -