Method #1
Consider your "user:user" is seem to a JsonObject. So please post JsonObject instead of Raw String.
You can construct a POJO class:
public class User{
public final String user;
User(String user) {
this.user = user;
}
}
Your method like this:
@POST(/login)
void login(@BODY User user,Callback<LoginResponse>)
And call this as:
User user = new User("john");
login(user,Callback<LoginResponse>)
Since Retrofit uses Gson by default, the User instances will be serialized as JSON as the sole body of the request. Default use content-type:application/json
Method #2
You just can post Raw String as Form Data with content-type:application/x-www-form-urlencoded and just need a @FormUrlEncoded annotation.
Here is your method:
@FormUrlEncoded
@POST(/login)
void login(@Field("yourkey") String user,Callback<LoginResponse>)
you just need to replace "yourkey" to your api's key - "user"
Call this as:
String user = "john";
login(user,Callback<LoginResponse>)
Reference:
How to POST raw whole JSON in the body of a Retrofit request
retrofit.http.Field
retrofit.http.FieldMap