protected HttpClientContext createHttpContext ( InternalRequest request ) { HttpClientContext context = HttpClientContext . create ( ) ; context . setRequestConfig ( this . requestConfigBuilder . setExpectContinueEnabled ( request . isExpectContinueEnabled ( ) ) . build ( ) ) ; if ( this . credentialsProvider != null ) { context . setCredentialsProvider ( this . credentialsProvider ) ; } if ( this . config . isProxyPreemptiveAuthenticationEnabled ( ) ) { AuthCache authCache = new BasicAuthCache ( ) ; authCache . put ( this . proxyHttpHost , new BasicScheme ( ) ) ; context . setAuthCache ( authCache ) ; } return context ; }
Creates HttpClient Context object based on the internal request .