org.apache.hc.client5.http

## Class ContextBuilder

- java.lang.Object
- - org.apache.hc.client5.http.ContextBuilder

-     public class ContextBuilder
      extends Object

  `HttpClientContext` builder.
  Since:
    5.2

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpClientContext` | `build()`
    `static ContextBuilder` | `create()`
    `static ContextBuilder` | `create(SchemePortResolver schemePortResolver)`
    `ContextBuilder` | `preemptiveAuth(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme)`
    `ContextBuilder` | `preemptiveBasicAuth(org.apache.hc.core5.http.HttpHost host, UsernamePasswordCredentials credentials)`
    `ContextBuilder` | `useAuthCache(AuthCache authCache)`
    `ContextBuilder` | `useAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry)`
    `ContextBuilder` | `useCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry)`
    `ContextBuilder` | `useCookieStore(CookieStore cookieStore)`
    `ContextBuilder` | `useCredentialsProvider(CredentialsProvider credentialsProvider)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static ContextBuilder create(SchemePortResolver schemePortResolver)

    - #### create

          public static ContextBuilder create()

    - #### useCookieSpecRegistry

          public ContextBuilder useCookieSpecRegistry(org.apache.hc.core5.http.config.Lookup<CookieSpecFactory> cookieSpecRegistry)

    - #### useAuthSchemeRegistry

          public ContextBuilder useAuthSchemeRegistry(org.apache.hc.core5.http.config.Lookup<AuthSchemeFactory> authSchemeRegistry)

    - #### useCookieStore

          public ContextBuilder useCookieStore(CookieStore cookieStore)

    - #### useCredentialsProvider

          public ContextBuilder useCredentialsProvider(CredentialsProvider credentialsProvider)

    - #### useAuthCache

          public ContextBuilder useAuthCache(AuthCache authCache)

    - #### preemptiveAuth

          public ContextBuilder preemptiveAuth(org.apache.hc.core5.http.HttpHost host,
                                               AuthScheme authScheme)

    - #### preemptiveBasicAuth

          public ContextBuilder preemptiveBasicAuth(org.apache.hc.core5.http.HttpHost host,
                                                    UsernamePasswordCredentials credentials)

    - #### build

          public HttpClientContext build()

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.