Skip to content

Instantly share code, notes, and snippets.

@emedinaa
Last active November 12, 2017 13:56
Show Gist options
  • Save emedinaa/8891480ced01a326a3cf9d0488087b26 to your computer and use it in GitHub Desktop.
Save emedinaa/8891480ced01a326a3cf9d0488087b26 to your computer and use it in GitHub Desktop.
Android-Retrofit
Multiple dynamic fields with Retrofit
HashMap<String, String> map = new HashMap<>();
map.put("param1", param1);
map.put("param2", param2);
map.put("param3", param3);
@FormUrlEncoded
@POST("/endpoint/")
Call<BaseResponse> endpoint(@Field("user_name") String userName, @FieldMap HashMap<String, String> hashFields);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment