I build a restAdapter by this:
return new RestAdapter.Builder()
.setEndpoint("https://www.xyz.com/")
.build()
.create(SafeUserApi.class);
then in the SafeUserApi.class (which is an interface) I have:
public interface SafeUserApi {
@POST("/api/userlogin")
void getUserLogin(@Body UserserLogin userLogin, Callback<LoginResult> cb);
}
But it does not work. Did I miss something?
I tried with Postman and it works. But in my device it doesn't.
I have these four library imported:
compile files('libs/okhttp-2.1.0.jar')
compile files('libs/okhttp-urlconnection-2.1.0.jar')
compile files('libs/okio-1.0.1.jar')
compile files('libs/retrofit-1.8.0.jar')