Java / Android + Retrofit: IllegalArgumentException: Only one HTTP method is allowed. Found: POST and POST.

What a terribly strange and cryptic error message to come across and totally undescriptive, so of course you've Googled it.

The source of the problem is actually quite easy to fix.

Take a look at your RetrofitAPI class. It'll probably look something like this:

Item saveEvent(@Path("id") int id, @Field("type") String type, @Field("title") String title, @Field("details") String details);

Well you're missing one more thing, the @FormUrlEncoded decorator!

That should fix up your problems.


Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog