code: @Nullable
      protected HttpEntity getHttpEntity(ClientRequest jerseyRequest) {
          if (jerseyRequest.getEntity() == null) {
              return null;
          }
  
          return chunkedEncodingEnabled ? new JerseyRequestHttpEntity(jerseyRequest) :
                  new BufferedJerseyRequestHttpEntity(jerseyRequest);
      }
docs: Get an Apache's {@link org.apache.http.HttpEntity}
  from Jersey's {@link org.glassfish.jersey.client.ClientRequest}
  <p>
  Create a custom HTTP entity, because Jersey doesn't provide
  a request stream or a byte buffer.
  </p>
  
  @param jerseyRequest representation of an HTTP request in Jersey
  @return a correct {@link org.apache.http.HttpEntity} implementation