title: Receiving Gzip JSON Response with Retrofit 2 + RxJava 2
body: <p>I'm trying to receive some data as a gzipped json, according to <a href="https://stackoverflow.com/a/33893542/6683139">this answer</a> by Jesse Wilson OkHttp automatically decompress and I don't have to do anything.</p>
  
  <p>So my question is, Can I receive the gzipped Json like this? :</p>
  
  <pre><code>apiService.getMessages().subscribeOn(Schedulers.io())
                  .observeOn(AndroidSchedulers.mainThread())
                  .subscribeWith(new DisposableSubscriber&lt;MessagesGet&gt;() {
                      @Override
                      public void onNext(MessagesGet messagesGet) {
  
  
  
                          Timber.d("GET MESSAGES DATA READY TO HANDLE");
  
                      }
  
                      @Override
                      public void onError(Throwable t) {
  
                          Timber.e("ERROR GETTING MESSAGES");
  
                      }
  
                      @Override
                      public void onComplete() {
  
                          Timber.e("GETMESSAGES COMPLETED");
  
                      }
                  });
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Headers({
              "Content-Type: application/json;charset=utf-8",
              "Accept: application/json"
      })
      @GET("getmessages")
      Flowable&lt;MessagesGet&gt; getMessages();
  </code></pre>