@Override
    public void sendRequest(final RequestChannel channel, final HttpContext context) throws HttpException, IOException {
        final HttpEntity requestEntity = request.getEntity();
        final SharedOutputBuffer buffer = requestEntity != null ? new SharedOutputBuffer(initialBufferSize) : null;
        bufferRef.set(buffer);
        repeatable = requestEntity == null || requestEntity.isRepeatable();
        channel.sendRequest(request, requestEntity, null);
        countDownLatch.countDown();
    }
TODO: to be replaced by core functionality
httpclient5/src/main/java/org/apache/hc/client5/http/impl/compat/ClassicToAsyncRequestProducer.java