rx-java Retrofit and RxJava Making serial requests


Example

RxJava is handy when making serial request. If you want to use the result from one request to make another you can use the flatMap operator:

api.getRepo(repoId).flatMap(repo -> api.getUser(repo.getOwnerId())
    .subscribe(/*do something with the result*/);