| I have spent some time playing with this and other Rx stuff, after a long call and doing a pair programming Summers Pittman and I realized it needs a chain call between the register and the HTTP call and it's not supported yet. We tried to do some workaround but it didn't work as we expected. example code
public Request<Void> registerDevice() { |
return Requester.call(() -> { |
core.getHttpLayer().newRequest() |
.post("someURL", "someData".getBytes()) |
.respondWith(new Responder<HttpResponse>() { |
@Override |
public void onResult(HttpResponse value) { |
// It should be the result of register call |
} |
|
@Override |
public void onException(Exception exception) { |
// It should be the exception of register call |
} |
}); |
|
// This is should not be the return of the register call, |
// it should be chain/delegate it for the http call |
return null; |
}); |
}
|
|