title: Retrofit API call receives "HTTP FAILED: java.io.IOException: Canceled"
body: <p>Can't figure out why is this happening. Neither one of rx callbacks (onCompleted(), onError(), onNext()) not gets triggered by my call. The only thing i receive is this okhttp output:</p>
  
  <pre class="lang-none prettyprint-override"><code>D/OkHttp: --&gt; GET https://api.privatbank.ua/p24api/exchange_rates?json=true&amp;date=20.11.2016 http/1.1
  D/OkHttp: --&gt; END GET
  D/OkHttp: &lt;-- HTTP FAILED: java.io.IOException: Canceled
  </code></pre>
  
  <p>Retrofit module:</p>
  
  <pre><code>@Module
  public class RestModule {
  
      @Provides
      @Singleton
      public HttpLoggingInterceptor providesHttpLogginInterceptor() {
          return new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY);
      }
  
      @Provides
      @Singleton
      public OkHttpClient providesOkHttpClient(@NonNull HttpLoggingInterceptor loggingInterceptor) {
          return new OkHttpClient.Builder()
              .addInterceptor(loggingInterceptor)
              .connectTimeout(ConstantsManager.CONNECTION_TIME_OUT, TimeUnit.SECONDS)
              .readTimeout(ConstantsManager.READ_TIME_OUT, TimeUnit.SECONDS)
              .build();
      }
  
      @Provides
      @Singleton
      public Gson providesGson() {
          return new GsonBuilder().create();
      }
  
      @Provides
      @Singleton
      public Retrofit providesRetrofit(@NonNull OkHttpClient okHttpClient, @NonNull Gson gson) {
          return new Retrofit.Builder()
              .baseUrl(ConstantsManager.BASE_URL)
              .client(okHttpClient)
              .addConverterFactory(SimpleXmlConverterFactory.create())
              .addConverterFactory(GsonConverterFactory.create(gson))
              .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
              .build();
      }
  
      @Provides
      @Singleton
      public PrivatbankApi providesPrivatbankApi(@NonNull Retrofit retrofit) {
          return retrofit.create(PrivatbankApi.class);
      }
  }
  </code></pre>
  
  <p>API interface:</p>
  
  <pre><code>public interface PrivatbankApi {
  
      @GET
      Observable&lt;CurrentRates&gt; loadCurrentRates(@NonNull @Url String url);
  
      @GET("exchange_rates")
      Observable&lt;DateRates&gt; loadDateRates(@NonNull @Query("json") Boolean json, @NonNull @Query("date") String date);
  
  }
  </code></pre>
  
  <p>Subscription:</p>
  
  <pre><code>subscription = dataManager.loadDateRates(date)
                  .subscribeOn(Schedulers.io())
                  .doAfterTerminate(() -&gt; {
                  })
                  .subscribe(dateRates -&gt; {
                      // My code here...
                  }, throwable -&gt; {
                      Timber.e(throwable, "Error while loading data occurred!");
                  });
  </code></pre>
  
  <p>By the way, both of the calls gets the same error:</p>
  
  <pre class="lang-none prettyprint-override"><code>D/OkHttp: --&gt; GET https://privat24.privatbank.ua/p24/accountorder?oper=prp&amp;PUREXML&amp;apicour&amp;country=ua http/1.1
  D/OkHttp: --&gt; END GET
  D/OkHttp: &lt;-- HTTP FAILED: java.io.IOException: Canceled
  D/OkHttp: --&gt; GET https://api.privatbank.ua/p24api/exchange_rates?json=true&amp;date=20.11.2016 http/1.1
  D/OkHttp: --&gt; END GET
  D/OkHttp: &lt;-- HTTP FAILED: java.io.IOException: Canceled
  </code></pre>