E uma dica: Retrofit tem suporte a FormURLEncoded out-of-box...
-- interface Api {
@FormUrlEncoded
@POST("/api.php")
Response post(@Field("produto") String produto, @Field("preco") float preco, @Field("local") String local);
}
// Later...
RestAdapter adapter = new RestAdapter.Builder().build();
Api api = adapter.create(Api.class);
api.post("meu produto", 10.f, "local");You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário