Skip to content

Instantly share code, notes, and snippets.

@kalvian1060
Created June 5, 2017 03:30
Show Gist options
  • Save kalvian1060/c124072dd7d5d88b69ebd5111119144f to your computer and use it in GitHub Desktop.
Save kalvian1060/c124072dd7d5d88b69ebd5111119144f to your computer and use it in GitHub Desktop.
RxOkhttp.streamLines(client, request)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(response -> {
// if response done do next download bla bla bla
}, throwable -> {
// if response failed do try again
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment