public static class HttpContext.Builder extends Object
Constructor and Description |
---|
HttpContext.Builder() |
Modifier and Type | Method and Description |
---|---|
HttpContext |
build()
Build HttpContext.
|
static HttpContext.Builder |
create()
Create a new
HttpContext.Builder . |
HttpContext.Builder |
withHeader(String headerName,
List<String> headerValues)
Set header list in the HttpContext.
|
HttpContext.Builder |
withHeader(String headerName,
String headerValue)
Add String-formatted header to the HttpContext.
|
HttpContext.Builder |
withHeaders(Map<String,List<String>> headers)
Set a list of given headers in the HttpContext.
|
HttpContext.Builder |
withSslContext(SSLContext context)
Add
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<String> headerValues)
headerName
- header nameheaderValues
- header valuepublic final HttpContext.Builder withHeaders(Map<String,List<String>> headers)
headers
- the headerspublic final HttpContext build()