My api now accepts true json objects as arguments, before that, I had to use "url encoding" to get there.
For most of my retrofit requests, the translation goes quite smoothly, but I have this one request that borther me :
@FormUrlEncoded
@POST("/api/**")
Call<QuestionAnswerResponse> postResponse(
@Path("id") String id,
@Field("self[text]") String text,
@Field("self[medias]") List<String> medias);
that I want to become :
@POST("/api/**")
Call<QuestionAnswerResponse> postResponse(
@Path("id") String id,
@Body ArgType args);
I should have in ArgType a public Map<String, Object> self
? How to do with this kind of types ?
Thanks,