Hanzala Iqbal Hanzala Iqbal - 1 month ago 23
Java Question

Retrofit POST java.io.EOFException occurs when I append parameters

I am using retrofit API for POST request it works fine for me if I use it to request without sending any parameter like this:

@POST("/api/basic/all")
void postFeedCat(Callback<AllNews> callback);


But when I want to try this:

@FormUrlEncoded
@POST("/api/news/all")
void postFeedNews(@Field("news_Id") String news_Id, Callback<AllNews> callback);


it returns

retrofit.RetrofitError: java.io.EOFException


but if this is tried more than one time it works successfully

Answer

Please Check new implementation here