Search in sources :

Example 6 with RequestConnControl

use of org.apache.http.protocol.RequestConnControl in project wso2-synapse by wso2.

the class ClientHandler method getHttpProcessor.

/**
 * Return the HttpProcessor for requests
 *
 * @return the HttpProcessor that processes requests
 */
private HttpProcessor getHttpProcessor() {
    BasicHttpProcessor httpProcessor = new BasicHttpProcessor();
    httpProcessor.addInterceptor(new RequestContent());
    httpProcessor.addInterceptor(new RequestTargetHost());
    httpProcessor.addInterceptor(new RequestConnControl());
    httpProcessor.addInterceptor(new RequestUserAgent());
    httpProcessor.addInterceptor(new RequestExpectContinue());
    return httpProcessor;
}
Also used : RequestContent(org.apache.http.protocol.RequestContent) RequestTargetHost(org.apache.http.protocol.RequestTargetHost) RequestConnControl(org.apache.http.protocol.RequestConnControl) RequestExpectContinue(org.apache.http.protocol.RequestExpectContinue) RequestUserAgent(org.apache.http.protocol.RequestUserAgent) BasicHttpProcessor(org.apache.http.protocol.BasicHttpProcessor)

Aggregations

RequestConnControl (org.apache.http.protocol.RequestConnControl)6 RequestAddCookies (org.apache.http.client.protocol.RequestAddCookies)3 BasicHttpProcessor (org.apache.http.protocol.BasicHttpProcessor)3 RequestContent (org.apache.http.protocol.RequestContent)3 RequestExpectContinue (org.apache.http.protocol.RequestExpectContinue)3 RequestTargetHost (org.apache.http.protocol.RequestTargetHost)3 RequestUserAgent (org.apache.http.protocol.RequestUserAgent)3 Inject (com.google.inject.Inject)2 Injector (com.google.inject.Injector)2 File (java.io.File)2 IOException (java.io.IOException)2 HttpURLConnection (java.net.HttpURLConnection)2 URL (java.net.URL)2 List (java.util.List)2 TimeUnit (java.util.concurrent.TimeUnit)2 Level (java.util.logging.Level)2 Logger (java.util.logging.Logger)2 Collectors (java.util.stream.Collectors)2 IOUtils (org.apache.commons.io.IOUtils)2 ConnectionClosedException (org.apache.http.ConnectionClosedException)2