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(HttpHost host, AuthScheme authScheme)`
    `ContextBuilder` | `preemptiveBasicAuth(HttpHost host, UsernamePasswordCredentials credentials)`
    `ContextBuilder` | `useAuthCache(AuthCache authCache)`
    `ContextBuilder` | `useAuthSchemeRegistry(Lookup<AuthSchemeFactory> authSchemeRegistry)`
    `ContextBuilder` | `useCookieSpecRegistry(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(Lookup<CookieSpecFactory> cookieSpecRegistry)

    - #### useAuthSchemeRegistry

          public ContextBuilder useAuthSchemeRegistry(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(HttpHost host,
                                               AuthScheme authScheme)

    - #### preemptiveBasicAuth

          public ContextBuilder preemptiveBasicAuth(HttpHost host,
                                                    UsernamePasswordCredentials credentials)

    - #### build

          public HttpClientContext build()

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