public static class HttpClientConfiguration.Builder extends Object
HttpClientConfiguration class.| Constructor and Description |
|---|
Builder()
Create builder with default values.
|
| Modifier and Type | Method and Description |
|---|---|
HttpClientConfiguration.Builder |
addDefaultCookie(Cookie cookie)
Add new default cookie.
|
HttpClientConfiguration.Builder |
addDefaultCookie(String name,
String value)
Add new default cookie.
|
HttpClientConfiguration.Builder |
addDefaultHeader(HttpHeader header)
Add new default header: if a header with the same name as already been added, it
will be overwritten with this new header.
|
HttpClientConfiguration.Builder |
addDefaultHeader(String name,
String value)
Add new default header: if a header with the same name as already been added, it
will be overwritten with this new header.
|
HttpClientConfiguration |
build()
Create new client configuration.
|
HttpClientConfiguration.Builder |
disableFollowRedirect()
Disable follow redirection handling.
|
HttpClientConfiguration.Builder |
enableFollowRedirect()
Enable follow redirection handling.
|
public HttpClientConfiguration.Builder addDefaultHeader(HttpHeader header)
header - The header.NullPointerException - If header is null.public HttpClientConfiguration.Builder addDefaultHeader(String name, String value)
name - Header name.value - Header value.NullPointerException - If name or value are null.IllegalArgumentException - If name is empty or blank.HttpHeader.header(String, String),
addDefaultHeader(HttpHeader)public HttpClientConfiguration.Builder addDefaultCookie(Cookie cookie)
cookie - The cookie to add.NullPointerException - If cookie is null.public HttpClientConfiguration.Builder addDefaultCookie(String name, String value)
name - Cookie name.value - Cookie value.NullPointerException - If name or value are null.Cookies.cookie(String, String),
addDefaultCookie(Cookie)public HttpClientConfiguration.Builder enableFollowRedirect()
public HttpClientConfiguration.Builder disableFollowRedirect()
public HttpClientConfiguration build()
Copyright © 2019. All rights reserved.