@Override
    protected CloseableHttpResponse doExecute(
            final HttpHost target,
            final ClassicHttpRequest request,
            final HttpContext context) throws IOException {
        Args.notNull(request, "HTTP request");
        try {
            final HttpClientContext localcontext = contextAdaptor.apply(context);
            RequestConfig config = null;
            if (request instanceof Configurable) {
                config = ((Configurable) request).getConfig();
            }
            if (config != null) {
                localcontext.setRequestConfig(config);
            }
            setupContext(localcontext);

            final HttpHost resolvedTarget = target != null ? target : RoutingSupport.determineHost(request);
            if (resolvedTarget != null) {
                if (request.getScheme() == null) {
                    request.setScheme(resolvedTarget.getSchemeName());
                }
                if (request.getAuthority() == null) {
                    request.setAuthority(new URIAuthority(resolvedTarget));
                }
            }
            final HttpRoute route = determineRoute(
                    resolvedTarget,
                    request,
                    localcontext);
            final String exchangeId = ExecSupport.getNextExchangeId();
            localcontext.setExchangeId(exchangeId);
            if (LOG.isDebugEnabled()) {
                LOG.debug("{} preparing request execution", exchangeId);
            }

            final ExecRuntime execRuntime = new InternalExecRuntime(LOG, connManager, requestExecutor,
                    request instanceof CancellableDependency ? (CancellableDependency) request : null);
            final ExecChain.Scope scope = new ExecChain.Scope(exchangeId, route, request, execRuntime, localcontext);
            final ClassicHttpResponse response = this.execChain.execute(ClassicRequestBuilder.copy(request).build(), scope);
            return CloseableHttpResponse.adapt(response);
        } catch (final HttpException httpException) {
            throw new ClientProtocolException(httpException.getMessage(), httpException);
        }
    }
Internal implementation of {@link CloseableHttpClient}.
<p>
Concurrent message exchanges executed by this client will get assigned to
separate connections leased from the connection pool.
</p>

@since 4.3
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/InternalHttpClient.java