code: public static ObservableHttp<ObservableHttpResponse> createRequest(final HttpAsyncRequestProducer requestProducer, final HttpAsyncClient client, final HttpContext context) {
  
          return ObservableHttp.create(new OnSubscribe<ObservableHttpResponse>() {
  
              @Override
              public void call(final Subscriber<? super ObservableHttpResponse> observer) {
  
                  final CompositeSubscription parentSubscription = new CompositeSubscription();
                  observer.add(parentSubscription);
  
                  // return a Subscription that wraps the Future so it can be cancelled
                  parentSubscription.add(Subscriptions.from(client.execute(requestProducer, new ResponseConsumerDelegate(observer, parentSubscription),
                          context, new FutureCallback<HttpResponse>() {
  
                              @Override
                              public void completed(HttpResponse result) {
                                  observer.onCompleted();
                              }
  
                              @Override
                              public void failed(Exception ex) {
                                  observer.onError(ex);
                              }
  
                              @Override
                              public void cancelled() {
                                  observer.onCompleted();
                              }
  
                          })));
              }
          });
      }
docs: Execute request using {@link HttpAsyncRequestProducer} to define HTTP Method, URI and payload (if applicable).
  <p>
  If the response is chunked (or flushed progressively such as with <i>text/event-stream</i> <a href="http://www.w3.org/TR/2009/WD-eventsource-20091029/">Server-Sent Events</a>) this will call
  {@link Observer#onNext} multiple times.
  <p>
  Use {@code HttpAsyncMethods.create* } factory methods to create {@link HttpAsyncRequestProducer} instances.
  <p>
  A client can be retrieved like this:
  <p>
  <pre> {@code      CloseableHttpAsyncClient httpclient = HttpAsyncClients.createDefault(); } </pre>
  <p>
  A client with custom configurations can be created like this:
  </p>
  <pre> {@code
  final RequestConfig requestConfig = RequestConfig.custom()
  .setSocketTimeout(3000)
  .setConnectTimeout(3000).build();
  final CloseableHttpAsyncClient httpclient = HttpAsyncClients.custom()
  .setDefaultRequestConfig(requestConfig)
  .setMaxConnPerRoute(20)
  .setMaxConnTotal(50)
  .build();
  httpclient.start();
  }</pre>
  
  
  @param requestProducer
  @param client
  @param context The HttpContext
  @return the observable HTTP response stream