Skip to content

Instantly share code, notes, and snippets.

@truedem
Last active October 24, 2018 22:43
Show Gist options
  • Select an option

  • Save truedem/2f2fa064d98a1a1c89d4b135ce1bb344 to your computer and use it in GitHub Desktop.

Select an option

Save truedem/2f2fa064d98a1a1c89d4b135ce1bb344 to your computer and use it in GitHub Desktop.
Types to use in RxJava for Retrofit
// One shot operation that returns a value (ie GET, shared prefs)? Single.
// One shot operation that returns nothing? (POST) Completable.
// One shot operation that might return null (ie fetch from a DB)? Maybe.
// An operation that returns multiple objects over time (ie websockets or a list)? Observable.
// use Kotlin coroutines? Deferred<T>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment