public static final class HttpRequestOptions.Builder extends Object implements AutoCloseable
Builder
for the HttpRequestOptions
class.
Instances of HttpRequestOptions.Builder
are created by calling HttpRequestOptions#newBuilder
.
Constructor and Description |
---|
Builder(HttpRequestOptions.Builder other) |
Modifier and Type | Method and Description |
---|---|
HttpRequestOptions |
build()
Returns an
HttpRequestOptions , based on the properties set on this builder. |
void |
close() |
protected void |
finalize() |
HttpRequestOptions.Builder |
header(HttpHeader header)
Sets the given http header to the set of headers for this options.
|
HttpRequestOptions.Builder |
header(String name,
String value)
Sets the given name value pair to the set of headers for this options.
|
HttpRequestOptions.Builder |
queryParameter(String name,
String value)
Sets the given name value pair to the set of query parameters for this options.
|
HttpRequestOptions.Builder |
queryParameter(UriQueryParameter queryParameter)
Sets the given query parameter to the set of query parameters for this options.
|
public Builder(@NotNull HttpRequestOptions.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public HttpRequestOptions build()
HttpRequestOptions
, based on the properties set on this builder.HttpRequestOptions
, based on the properties set on this builder.@NotNull public HttpRequestOptions.Builder header(@NotNull String name, @NotNull String value)
name
- header namevalue
- header value@NotNull public HttpRequestOptions.Builder header(@NotNull HttpHeader header)
header
- an HttpHeader
.@NotNull public HttpRequestOptions.Builder queryParameter(@NotNull String name, @NotNull String value)
name
- query parameter name.value
- query parameter value.@NotNull public HttpRequestOptions.Builder queryParameter(@NotNull UriQueryParameter queryParameter)
queryParameter
- an UriQueryParameter
.