Search in sources :

Example 1 with RequestUserAgent

use of org.apache.http.protocol.RequestUserAgent in project robovm by robovm.

the class DefaultHttpClient method createHttpProcessor.

@Override
protected BasicHttpProcessor createHttpProcessor() {
    BasicHttpProcessor httpproc = new BasicHttpProcessor();
    httpproc.addInterceptor(new RequestDefaultHeaders());
    // Required protocol interceptors
    httpproc.addInterceptor(new RequestContent());
    httpproc.addInterceptor(new RequestTargetHost());
    // Recommended protocol interceptors
    httpproc.addInterceptor(new RequestConnControl());
    httpproc.addInterceptor(new RequestUserAgent());
    httpproc.addInterceptor(new RequestExpectContinue());
    // HTTP state management interceptors
    httpproc.addInterceptor(new RequestAddCookies());
    httpproc.addInterceptor(new ResponseProcessCookies());
    // HTTP authentication interceptors
    httpproc.addInterceptor(new RequestTargetAuthentication());
    httpproc.addInterceptor(new RequestProxyAuthentication());
    return httpproc;
}
Also used : RequestAddCookies(org.apache.http.client.protocol.RequestAddCookies) RequestContent(org.apache.http.protocol.RequestContent) RequestTargetHost(org.apache.http.protocol.RequestTargetHost) RequestConnControl(org.apache.http.protocol.RequestConnControl) RequestProxyAuthentication(org.apache.http.client.protocol.RequestProxyAuthentication) RequestExpectContinue(org.apache.http.protocol.RequestExpectContinue) RequestUserAgent(org.apache.http.protocol.RequestUserAgent) RequestDefaultHeaders(org.apache.http.client.protocol.RequestDefaultHeaders) RequestTargetAuthentication(org.apache.http.client.protocol.RequestTargetAuthentication) ResponseProcessCookies(org.apache.http.client.protocol.ResponseProcessCookies) BasicHttpProcessor(org.apache.http.protocol.BasicHttpProcessor)

Example 2 with RequestUserAgent

use of org.apache.http.protocol.RequestUserAgent in project XobotOS by xamarin.

the class DefaultHttpClient method createHttpProcessor.

@Override
protected BasicHttpProcessor createHttpProcessor() {
    BasicHttpProcessor httpproc = new BasicHttpProcessor();
    httpproc.addInterceptor(new RequestDefaultHeaders());
    // Required protocol interceptors
    httpproc.addInterceptor(new RequestContent());
    httpproc.addInterceptor(new RequestTargetHost());
    // Recommended protocol interceptors
    httpproc.addInterceptor(new RequestConnControl());
    httpproc.addInterceptor(new RequestUserAgent());
    httpproc.addInterceptor(new RequestExpectContinue());
    // HTTP state management interceptors
    httpproc.addInterceptor(new RequestAddCookies());
    httpproc.addInterceptor(new ResponseProcessCookies());
    // HTTP authentication interceptors
    httpproc.addInterceptor(new RequestTargetAuthentication());
    httpproc.addInterceptor(new RequestProxyAuthentication());
    return httpproc;
}
Also used : RequestAddCookies(org.apache.http.client.protocol.RequestAddCookies) RequestContent(org.apache.http.protocol.RequestContent) RequestTargetHost(org.apache.http.protocol.RequestTargetHost) RequestConnControl(org.apache.http.protocol.RequestConnControl) RequestProxyAuthentication(org.apache.http.client.protocol.RequestProxyAuthentication) RequestExpectContinue(org.apache.http.protocol.RequestExpectContinue) RequestUserAgent(org.apache.http.protocol.RequestUserAgent) RequestDefaultHeaders(org.apache.http.client.protocol.RequestDefaultHeaders) RequestTargetAuthentication(org.apache.http.client.protocol.RequestTargetAuthentication) ResponseProcessCookies(org.apache.http.client.protocol.ResponseProcessCookies) BasicHttpProcessor(org.apache.http.protocol.BasicHttpProcessor)

Example 3 with RequestUserAgent

use of org.apache.http.protocol.RequestUserAgent 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)

Example 4 with RequestUserAgent

use of org.apache.http.protocol.RequestUserAgent in project platform_external_apache-http by android.

the class DefaultHttpClient method createHttpProcessor.

@Override
protected BasicHttpProcessor createHttpProcessor() {
    BasicHttpProcessor httpproc = new BasicHttpProcessor();
    httpproc.addInterceptor(new RequestDefaultHeaders());
    // Required protocol interceptors
    httpproc.addInterceptor(new RequestContent());
    httpproc.addInterceptor(new RequestTargetHost());
    // Recommended protocol interceptors
    httpproc.addInterceptor(new RequestConnControl());
    httpproc.addInterceptor(new RequestUserAgent());
    httpproc.addInterceptor(new RequestExpectContinue());
    // HTTP state management interceptors
    httpproc.addInterceptor(new RequestAddCookies());
    httpproc.addInterceptor(new ResponseProcessCookies());
    // HTTP authentication interceptors
    httpproc.addInterceptor(new RequestTargetAuthentication());
    httpproc.addInterceptor(new RequestProxyAuthentication());
    return httpproc;
}
Also used : RequestAddCookies(org.apache.http.client.protocol.RequestAddCookies) RequestContent(org.apache.http.protocol.RequestContent) RequestTargetHost(org.apache.http.protocol.RequestTargetHost) RequestConnControl(org.apache.http.protocol.RequestConnControl) RequestProxyAuthentication(org.apache.http.client.protocol.RequestProxyAuthentication) RequestExpectContinue(org.apache.http.protocol.RequestExpectContinue) RequestUserAgent(org.apache.http.protocol.RequestUserAgent) RequestDefaultHeaders(org.apache.http.client.protocol.RequestDefaultHeaders) RequestTargetAuthentication(org.apache.http.client.protocol.RequestTargetAuthentication) ResponseProcessCookies(org.apache.http.client.protocol.ResponseProcessCookies) BasicHttpProcessor(org.apache.http.protocol.BasicHttpProcessor)

Aggregations

BasicHttpProcessor (org.apache.http.protocol.BasicHttpProcessor)4 RequestConnControl (org.apache.http.protocol.RequestConnControl)4 RequestContent (org.apache.http.protocol.RequestContent)4 RequestExpectContinue (org.apache.http.protocol.RequestExpectContinue)4 RequestTargetHost (org.apache.http.protocol.RequestTargetHost)4 RequestUserAgent (org.apache.http.protocol.RequestUserAgent)4 RequestAddCookies (org.apache.http.client.protocol.RequestAddCookies)3 RequestDefaultHeaders (org.apache.http.client.protocol.RequestDefaultHeaders)3 RequestProxyAuthentication (org.apache.http.client.protocol.RequestProxyAuthentication)3 RequestTargetAuthentication (org.apache.http.client.protocol.RequestTargetAuthentication)3 ResponseProcessCookies (org.apache.http.client.protocol.ResponseProcessCookies)3