Skip to content

Instantly share code, notes, and snippets.

@dlew
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dlew/680175f035de85af3e29 to your computer and use it in GitHub Desktop.
Save dlew/680175f035de85af3e29 to your computer and use it in GitHub Desktop.
RetrofitService.doTheThing(params) // Your typical API call
.subscribeOn(Schedulers.io()) // Execute API call on IO thread
.observeOn(AndroidSchedulers.mainThread()) // Execute observers on Android's main thread
.subscribe(results -> handle(results)); // Handling the results of the API call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment