Example usage for org.apache.http.client.protocol HttpClientContext COOKIESPEC_REGISTRY

List of usage examples for org.apache.http.client.protocol HttpClientContext COOKIESPEC_REGISTRY

Introduction

In this page you can find the example usage for org.apache.http.client.protocol HttpClientContext COOKIESPEC_REGISTRY.

Prototype

String COOKIESPEC_REGISTRY

To view the source code for org.apache.http.client.protocol HttpClientContext COOKIESPEC_REGISTRY.

Click Source Link

Document

Attribute name of a org.apache.http.config.Lookup object that represents the actual CookieSpecProvider registry.

Usage

From source file:org.apache.http.impl.client.InternalHttpClient.java

private void setupContext(final HttpClientContext context) {
    if (context.getAttribute(HttpClientContext.TARGET_AUTH_STATE) == null) {
        context.setAttribute(HttpClientContext.TARGET_AUTH_STATE, new AuthState());
    }// www  . ja  va 2  s .c  om
    if (context.getAttribute(HttpClientContext.PROXY_AUTH_STATE) == null) {
        context.setAttribute(HttpClientContext.PROXY_AUTH_STATE, new AuthState());
    }
    if (context.getAttribute(HttpClientContext.AUTHSCHEME_REGISTRY) == null) {
        context.setAttribute(HttpClientContext.AUTHSCHEME_REGISTRY, this.authSchemeRegistry);
    }
    if (context.getAttribute(HttpClientContext.COOKIESPEC_REGISTRY) == null) {
        context.setAttribute(HttpClientContext.COOKIESPEC_REGISTRY, this.cookieSpecRegistry);
    }
    if (context.getAttribute(HttpClientContext.COOKIE_STORE) == null) {
        context.setAttribute(HttpClientContext.COOKIE_STORE, this.cookieStore);
    }
    if (context.getAttribute(HttpClientContext.CREDS_PROVIDER) == null) {
        context.setAttribute(HttpClientContext.CREDS_PROVIDER, this.credentialsProvider);
    }
    if (context.getAttribute(HttpClientContext.REQUEST_CONFIG) == null) {
        context.setAttribute(HttpClientContext.REQUEST_CONFIG, this.defaultConfig);
    }
}