-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Call Adapters
Jake Wharton edited this page Sep 7, 2020
·
7 revisions
Retrofit is pluggable allowing different execution mechanisms and their libraries to be used for performing the HTTP call. This allows API requests to seamlessly compose with any existing threading model and/or task framework in the rest of your app.
These are called call adapters, and Retrofit includes a few first-party modules for popular frameworks:
-
RxJava
Observable
&Single
-com.squareup.retrofit2:adapter-rxjava
-
RxJava2
Observable
,Flowable
,Single
,Completable
&Maybe
-com.squareup.retrofit2:adapter-rxjava2
-
RxJava3
Observable
,Flowable
,Single
,Completable
&Maybe
-com.squareup.retrofit2:adapter-rxjava3
-
Guava
ListenableFuture
-com.squareup.retrofit2:adapter-guava
-
Java 8
CompletableFuture
-com.squareup.retrofit2:adapter-java8
- [Kotlin
suspend
functions] - No dependency needed!
Various third-party adapters have been created by the community for other libraries: