I am using retrofit to make a post api call, I am getting the following error while trying to hit the endpoint.
Caused by: rx.exceptions.OnErrorNotImple
It looks like Retrofit wants POST requests to have a payload. There's already an issue for it: https://github.com/square/retrofit/issues/854
As a workaround, you could do something like this:
@POST("/service/v2/auth/ip-address")
rx.Observable verifyIP(@Body Object dummy);
and then do:
LoginService service = CKRestClient.get().create(LoginService.class);
service.verifyIP(null).observeOn(AndroidSchedulers.mainThread()).subscribe(
new Action1() {
@Override
public void call(AuthState authState) {
// ...
}
});
});
Or, if service.verifyIP(null)
throws a NPE, replace it with service.verifyIP("")
or similar.