JakeWharton Update to OkHttp 3.11
Use get instead of parse for HttpUrl and MediaType where valid input is always required.
Latest commit ce71d05 Jul 13, 2018
Failed to load latest commit information.
src Update to OkHttp 3.11 Jul 13, 2018
README.md Update README.md Jul 4, 2018
pom.xml [maven-release-plugin] prepare for next development iteration Mar 14, 2018


RxJava Adapter

An Adapter for adapting RxJava 1.x types.

Available types:

  • Observable<T>, Observable<Response<T>>, and Observable<Result<T>> where T is the body type.
  • Single<T>, Single<Response<T>>, and Single<Result<T>> where T is the body type.
  • Completable where response bodies are discarded.


Add RxJavaCallAdapterFactory as a Call adapter when building your Retrofit instance:

Retrofit retrofit = new Retrofit.Builder()

Your service methods can now use any of the above types as their return type.

interface MyService {
  Observable<User> getUser();

By default all reactive types execute their requests synchronously. There are multiple ways to control the threading on which a request occurs:

  • Call subscribeOn on the returned reactive type with a Scheduler of your choice.
  • Use createAsync() when creating the factory which will use OkHttp's internal thread pool.
  • Use createWithScheduler(Scheduler) to supply a default subscription Scheduler.


Download the latest JAR or grab via Maven:


or Gradle:

implementation 'com.squareup.retrofit2:adapter-rxjava:latest.version'

Snapshots of the development version are available in Sonatype's snapshots repository.