Search in sources :

Example 1 with ImmutableHttpProcessor

use of org.apache.http.protocol.ImmutableHttpProcessor in project camel by apache.

the class HttpCompressionTest method getBasicHttpProcessor.

@Override
protected HttpProcessor getBasicHttpProcessor() {
    List<HttpRequestInterceptor> requestInterceptors = new ArrayList<HttpRequestInterceptor>();
    requestInterceptors.add(new RequestDecompressingInterceptor());
    List<HttpResponseInterceptor> responseInterceptors = new ArrayList<HttpResponseInterceptor>();
    responseInterceptors.add(new ResponseCompressingInterceptor());
    responseInterceptors.add(new ResponseBasicUnauthorized());
    ImmutableHttpProcessor httpproc = new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
    return httpproc;
}
Also used : HttpRequestInterceptor(org.apache.http.HttpRequestInterceptor) ResponseBasicUnauthorized(org.apache.http.localserver.ResponseBasicUnauthorized) ArrayList(java.util.ArrayList) HttpResponseInterceptor(org.apache.http.HttpResponseInterceptor) ImmutableHttpProcessor(org.apache.http.protocol.ImmutableHttpProcessor)

Example 2 with ImmutableHttpProcessor

use of org.apache.http.protocol.ImmutableHttpProcessor in project camel by apache.

the class HttpAuthenticationTest method getBasicHttpProcessor.

@Override
protected HttpProcessor getBasicHttpProcessor() {
    List<HttpRequestInterceptor> requestInterceptors = new ArrayList<HttpRequestInterceptor>();
    requestInterceptors.add(new RequestBasicAuth());
    List<HttpResponseInterceptor> responseInterceptors = new ArrayList<HttpResponseInterceptor>();
    responseInterceptors.add(new ResponseContent());
    responseInterceptors.add(new ResponseBasicUnauthorized());
    ImmutableHttpProcessor httpproc = new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
    return httpproc;
}
Also used : ResponseContent(org.apache.http.protocol.ResponseContent) HttpRequestInterceptor(org.apache.http.HttpRequestInterceptor) ResponseBasicUnauthorized(org.apache.http.localserver.ResponseBasicUnauthorized) ArrayList(java.util.ArrayList) HttpResponseInterceptor(org.apache.http.HttpResponseInterceptor) RequestBasicAuth(org.apache.http.localserver.RequestBasicAuth) ImmutableHttpProcessor(org.apache.http.protocol.ImmutableHttpProcessor)

Example 3 with ImmutableHttpProcessor

use of org.apache.http.protocol.ImmutableHttpProcessor in project camel by apache.

the class HttpProxyServerTest method getBasicHttpProcessor.

@Override
protected HttpProcessor getBasicHttpProcessor() {
    List<HttpRequestInterceptor> requestInterceptors = new ArrayList<HttpRequestInterceptor>();
    requestInterceptors.add(new RequestProxyBasicAuth());
    List<HttpResponseInterceptor> responseInterceptors = new ArrayList<HttpResponseInterceptor>();
    responseInterceptors.add(new ResponseContent());
    responseInterceptors.add(new ResponseProxyBasicUnauthorized());
    ImmutableHttpProcessor httpproc = new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
    return httpproc;
}
Also used : ResponseContent(org.apache.http.protocol.ResponseContent) HttpRequestInterceptor(org.apache.http.HttpRequestInterceptor) ArrayList(java.util.ArrayList) HttpResponseInterceptor(org.apache.http.HttpResponseInterceptor) ImmutableHttpProcessor(org.apache.http.protocol.ImmutableHttpProcessor)

Example 4 with ImmutableHttpProcessor

use of org.apache.http.protocol.ImmutableHttpProcessor in project camel by apache.

the class HttpsAuthenticationTest method getBasicHttpProcessor.

@Override
protected HttpProcessor getBasicHttpProcessor() {
    List<HttpRequestInterceptor> requestInterceptors = new ArrayList<HttpRequestInterceptor>();
    requestInterceptors.add(new RequestBasicAuth());
    List<HttpResponseInterceptor> responseInterceptors = new ArrayList<HttpResponseInterceptor>();
    responseInterceptors.add(new ResponseContent());
    responseInterceptors.add(new ResponseBasicUnauthorized());
    ImmutableHttpProcessor httpproc = new ImmutableHttpProcessor(requestInterceptors, responseInterceptors);
    return httpproc;
}
Also used : ResponseContent(org.apache.http.protocol.ResponseContent) HttpRequestInterceptor(org.apache.http.HttpRequestInterceptor) ResponseBasicUnauthorized(org.apache.http.localserver.ResponseBasicUnauthorized) ArrayList(java.util.ArrayList) HttpResponseInterceptor(org.apache.http.HttpResponseInterceptor) RequestBasicAuth(org.apache.http.localserver.RequestBasicAuth) ImmutableHttpProcessor(org.apache.http.protocol.ImmutableHttpProcessor)

Aggregations

ArrayList (java.util.ArrayList)4 HttpRequestInterceptor (org.apache.http.HttpRequestInterceptor)4 HttpResponseInterceptor (org.apache.http.HttpResponseInterceptor)4 ImmutableHttpProcessor (org.apache.http.protocol.ImmutableHttpProcessor)4 ResponseBasicUnauthorized (org.apache.http.localserver.ResponseBasicUnauthorized)3 ResponseContent (org.apache.http.protocol.ResponseContent)3 RequestBasicAuth (org.apache.http.localserver.RequestBasicAuth)2