code: public <T, THeader> Observable<ServiceResponseWithHeaders<T, THeader>> getPostOrDeleteResultWithHeadersAsync(Observable<Response<ResponseBody>> observable, Type resourceType, final Class<THeader> headerType) {
          Observable<ServiceResponse<T>> bodyResponse = getPostOrDeleteResultAsync(observable, resourceType);
          return bodyResponse
                  .flatMap(new Func1<ServiceResponse<T>, Observable<ServiceResponseWithHeaders<T, THeader>>>() {
                      @Override
                      public Observable<ServiceResponseWithHeaders<T, THeader>> call(ServiceResponse<T> serviceResponse) {
                          try {
                              return Observable
                                      .just(new ServiceResponseWithHeaders<>(serviceResponse.body(),
                                              restClient().serializerAdapter().<THeader>deserialize(restClient().serializerAdapter().serialize(serviceResponse.response().headers()), headerType),
                                              serviceResponse.response()));
                          } catch (IOException e) {
                              return Observable.error(e);
                          }
                      }
                  });
      }
docs: Handles an initial response from a POST or DELETE operation response by polling
  the status of the operation asynchronously, calling the user provided callback
  when the operation terminates.
  
  @param observable  the initial observable from the POST or DELETE operation.
  @param <T>       the return type of the caller
  @param <THeader> the type of the response header
  @param resourceType the java.lang.reflect.Type of the resource.
  @param headerType the type of the response header
  @return          the task describing the asynchronous polling.