I create a restAdapter as follows:
return new RestAdapter.Builder() .setEndpoint("https://www.xyz.com/") .build() .create(SafeUserApi.class);
then in SafeUserApi.class (which is the interface) I have:
public interface SafeUserApi { @POST("/api/userlogin") void getUserLogin(@Body UserserLogin userLogin, Callback<LoginResult> cb); }
But that will not work. Did I miss something?
I tried with Postman and it works. But in my device this is not so.
I have these four libraries 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')
source share