("Request must not be null.");
}
// a null target may be acceptable, this depends on the route planner
// a null context is acceptable, default context created below
ClientRequestDirector director = null;
// Initialize the request execution context making copies of
// all shared objects that are potentially threading unsafe.
synchronized (this) {
if (context == null) {
context = new BasicHttpContext(getDefaultContext());
}
// Create a director for this request
director = new DefaultClientRequestDirector(
getConnectionManager(),
getConnectionReuseStrategy(),
getRoutePlanner(),
getHttpProcessor().copy(),
getHttpRequestRetryHandler(),
getRedirectHandler(),
getTargetAuthenticationHandler(),
getProxyAuthenticationHandler(),
determineParams(request));
}
HttpResponse response = director.execute(target, request, context);
// If the response depends on the connection, the director
// will have set up an auto-release input stream.
//@@@ "finalize" response, to allow for buffering of entities?
//@@@ here or in director?