I am using Retrofit to access my API as follows:
public interface UserService {
...
@POST(\"/user/login\")
public Observable register(@Bo
you can use unsafe unsafeSubscribe.
...
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.unsafeSubscribe(new Observer() {
@Override
public void onCompleted() {
....
}
@Override
public void onError(Throwable e) {
....
}
@Override
public void onNext(User user) {
....
}
});
...