public static class HttpContext.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HttpContext |
build()
Builds the HttpContext.
|
static HttpContext.Builder |
create()
Creates a new
HttpContext.Builder . |
HttpContext.Builder |
withHeader(String headerName,
List headerValues)
Sets header list in the HttpContext.
|
HttpContext.Builder |
withHeader(String headerName,
String headerValue)
Adds a string-formatted header to the HttpContext.
|
HttpContext.Builder |
withHeaders(Map headers)
Sets a list of given headers in the HttpContext.
|
HttpContext.Builder |
withSslContext(SSLContext context)
Adds
SSLContext to the HTTP context. |
public static HttpContext.Builder create()
HttpContext.Builder
.public final HttpContext.Builder withSslContext(SSLContext context)
SSLContext
to the HTTP context.context
- SSL contextpublic final HttpContext.Builder withHeader(String headerName, String headerValue)
headerName
- header nameheaderValue
- header valuepublic final HttpContext.Builder withHeader(String headerName, List headerValues)
headerName
- header nameheaderValues
- header valuepublic final HttpContext.Builder withHeaders(Map headers)
headers
- the headerspublic final HttpContext build()