public static HttpClientContext newClientContext(HttpClientSettings settings,
                                                     Map<String, ? extends Object>
                                                             attributes) {
        final HttpClientContext clientContext = new HttpClientContext();

        if (attributes != null && !attributes.isEmpty()) {
            for (Map.Entry<String, ?> entry : attributes.entrySet()) {
                clientContext.setAttribute(entry.getKey(), entry.getValue());
            }
        }

        addPreemptiveAuthenticationProxy(clientContext, settings);

        clientContext.setAttribute(HttpContextUtils.DISABLE_SOCKET_PROXY_PROPERTY, settings.disableSocketProxy());
        return clientContext;

    }
public static HttpClientContext newClientContext ( HttpClientSettings settings , Map < String , ? extends Object > attributes ) { final HttpClientContext clientContext = new HttpClientContext ( ) ; if ( attributes != null && ! attributes . isEmpty ( ) ) { for ( Map . Entry < String , ? > entry : attributes . entrySet ( ) ) { clientContext . setAttribute ( entry . getKey ( ) , entry . getValue ( ) ) ; } } addPreemptiveAuthenticationProxy ( clientContext , settings ) ; clientContext . setAttribute ( HttpContextUtils . DISABLE_SOCKET_PROXY_PROPERTY , settings . disableSocketProxy ( ) ) ; return clientContext ; }
Returns a new HttpClientContext used for request execution.