List of usage examples for org.apache.http.impl.client HttpClientBuilder setHttpProcessor
public final HttpClientBuilder setHttpProcessor(final HttpProcessor httpprocessor)
From source file:com.gargoylesoftware.htmlunit.HttpWebConnection.java
private void configureHttpProcessorBuilder(final HttpClientBuilder builder, final WebRequest webRequest) throws IOException { final HttpProcessorBuilder b = HttpProcessorBuilder.create(); for (final HttpRequestInterceptor i : getHttpRequestInterceptors(webRequest)) { b.add(i);/* w w w. j av a 2 s. c om*/ } // These are the headers used in HttpClientBuilder, excluding the already added ones // (RequestClientConnControl and RequestAddCookies) b.addAll(new RequestDefaultHeaders(null), new RequestContent(), new RequestTargetHost(), new RequestExpectContinue()); b.add(new RequestAcceptEncoding()); b.add(new RequestAuthCache()); b.add(new ResponseProcessCookies()); b.add(new ResponseContentEncoding()); builder.setHttpProcessor(b.build()); }