We need to send a POST request to a web service that needs dynamic multiple fields.
I mean, we need to send something like this as POST request:
question1='answer1'&question2='answer1'&question2='answer2'&question3='answer1'
where question1 and question2 are not set in compilation time. We know that we can use a @FieldMap for using dynamic fields, but we cannot send the same field more than one time.
This is our Retrofit code:
@FormUrlEncoded
@POST("/desafios/send/")
Observable<BaseServerMsgArray> postSubmitSurvey(@Field("customerId") Long customerId, @Field("upload_from_app") int uploadFromApp, @FieldMap HashMap<String, ArrayList<String>> hashFields);
Could anyone help us?
Thanks in advance,