Went to upgrade to Retrofit 2.0 and running into this weird problem.
I have a method to log a user in
public interface ApiInterface {
@Multipart
I don't know if it is too late, but we can also send requests with RequestBody.
Example:
public interface ApiInterface {
@Multipart
@POST("user/login/")
Call userLogin(@Part("username") String username, @Part("password") String password);
}
We can convert as below:
public interface ApiInterface {
@Multipart
@POST("user/login/")
Call userLogin(@Part("username") RequestBody username, @Part("password") String password);
}