public static interface SdkHttpFullRequest.Builder extends SdkHttpRequest.Builder
SdkHttpFullRequest. An instance of this can be created using
SdkHttpFullRequest.builder().| Modifier and Type | Method and Description |
|---|---|
SdkHttpFullRequest.Builder |
appendHeader(String headerName,
String headerValue)
Add a single header to be included in the created HTTP request.
|
SdkHttpFullRequest.Builder |
appendRawQueryParameter(String paramName,
String paramValue)
Add a single un-encoded query parameter to be included in the created HTTP request.
|
SdkHttpFullRequest.Builder |
applyMutation(Consumer<SdkHttpRequest.Builder> mutator) |
SdkHttpFullRequest |
build() |
SdkHttpFullRequest.Builder |
clearHeaders()
Removes all headers from this builder.
|
SdkHttpFullRequest.Builder |
clearQueryParameters()
Removes all query parameters from this builder.
|
ContentStreamProvider |
contentStreamProvider() |
SdkHttpFullRequest.Builder |
contentStreamProvider(ContentStreamProvider contentStreamProvider)
Set the
ContentStreamProvider for this request. |
SdkHttpFullRequest.Builder |
copy() |
String |
encodedPath()
The path, exactly as it was configured with
encodedPath(String). |
SdkHttpFullRequest.Builder |
encodedPath(String path)
Configure an
SdkHttpRequest.encodedPath() to be used in the created HTTP request. |
default Optional<String> |
firstMatchingHeader(String header)
Perform a case-insensitive search for a particular header in this request, returning the first matching header, if one
is found.
|
Map<String,List<String>> |
headers()
The query parameters, exactly as they were configured with
headers(Map),
putHeader(String, String) and putHeader(String, List). |
SdkHttpFullRequest.Builder |
headers(Map<String,List<String>> headers)
Configure an
SdkHttpHeaders.headers() to be used in the created HTTP request. |
String |
host()
The host, exactly as it was configured with
host(String). |
SdkHttpFullRequest.Builder |
host(String host)
Configure a
SdkHttpRequest.host() to be used in the created HTTP request. |
SdkHttpMethod |
method()
The path, exactly as it was configured with
method(SdkHttpMethod). |
SdkHttpFullRequest.Builder |
method(SdkHttpMethod httpMethod)
Configure an
SdkHttpRequest.method() to be used in the created HTTP request. |
Integer |
port()
The port, exactly as it was configured with
port(Integer). |
SdkHttpFullRequest.Builder |
port(Integer port)
Configure a
SdkHttpRequest.port() to be used in the created HTTP request. |
String |
protocol()
The protocol, exactly as it was configured with
protocol(String). |
SdkHttpFullRequest.Builder |
protocol(String protocol)
Configure a
SdkHttpRequest.protocol() to be used in the created HTTP request. |
SdkHttpFullRequest.Builder |
putHeader(String headerName,
List<String> headerValues)
Add a single header with multiple values to be included in the created HTTP request.
|
default SdkHttpFullRequest.Builder |
putHeader(String headerName,
String headerValue)
Add a single header to be included in the created HTTP request.
|
SdkHttpFullRequest.Builder |
putRawQueryParameter(String paramName,
List<String> paramValues)
Add a single un-encoded query parameter with multiple values to be included in the created HTTP request.
|
default SdkHttpFullRequest.Builder |
putRawQueryParameter(String paramName,
String paramValue)
Add a single un-encoded query parameter to be included in the created HTTP request.
|
Map<String,List<String>> |
rawQueryParameters()
The query parameters, exactly as they were configured with
rawQueryParameters(Map),
putRawQueryParameter(String, String) and putRawQueryParameter(String, List). |
SdkHttpFullRequest.Builder |
rawQueryParameters(Map<String,List<String>> queryParameters)
Configure an
SdkHttpRequest.rawQueryParameters() to be used in the created HTTP request. |
SdkHttpFullRequest.Builder |
removeHeader(String headerName)
Remove all values for the requested header from this builder.
|
SdkHttpFullRequest.Builder |
removeQueryParameter(String paramName)
Remove all values for the requested query parameter from this builder.
|
default SdkHttpFullRequest.Builder |
uri(URI uri)
|
default SdkHttpFullRequest.Builder uri(URI uri)
uri in interface SdkHttpRequest.Builderuri - URI containing protocol, host, port and path.String protocol()
protocol(String).protocol in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder protocol(String protocol)
SdkHttpRequest.protocol() to be used in the created HTTP request. This is not validated until the
http request is created.protocol in interface SdkHttpRequest.BuilderString host()
host(String).host in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder host(String host)
SdkHttpRequest.host() to be used in the created HTTP request. This is not validated until the
http request is created.host in interface SdkHttpRequest.BuilderInteger port()
port(Integer).port in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder port(Integer port)
SdkHttpRequest.port() to be used in the created HTTP request. This is not validated until the
http request is created. In order to simplify mapping from a URI, "-1" will be treated as "null" when the http
request is created.port in interface SdkHttpRequest.BuilderString encodedPath()
encodedPath(String).encodedPath in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder encodedPath(String path)
SdkHttpRequest.encodedPath() to be used in the created HTTP request. This is not validated
until the http request is created. This path MUST be URL encoded.
Justification of requirements: The path must be encoded when it is configured, because there is no way for the HTTP implementation to distinguish a "/" that is part of a resource name that should be encoded as "%2F" from a "/" that is part of the actual path.
encodedPath in interface SdkHttpRequest.BuilderMap<String,List<String>> rawQueryParameters()
rawQueryParameters(Map),
putRawQueryParameter(String, String) and putRawQueryParameter(String, List).rawQueryParameters in interface SdkHttpRequest.Builderdefault SdkHttpFullRequest.Builder putRawQueryParameter(String paramName, String paramValue)
This completely OVERRIDES any values already configured with this parameter name in the builder.
putRawQueryParameter in interface SdkHttpRequest.BuilderparamName - The name of the query parameter to addparamValue - The un-encoded value for the query parameter.SdkHttpFullRequest.Builder appendRawQueryParameter(String paramName, String paramValue)
This will ADD the value to any existing values already configured with this parameter name in the builder.
appendRawQueryParameter in interface SdkHttpRequest.BuilderparamName - The name of the query parameter to addparamValue - The un-encoded value for the query parameter.SdkHttpFullRequest.Builder putRawQueryParameter(String paramName, List<String> paramValues)
This completely OVERRIDES any values already configured with this parameter name in the builder.
putRawQueryParameter in interface SdkHttpRequest.BuilderparamName - The name of the query parameter to addparamValues - The un-encoded values for the query parameter.SdkHttpFullRequest.Builder rawQueryParameters(Map<String,List<String>> queryParameters)
SdkHttpRequest.rawQueryParameters() to be used in the created HTTP request. This is not validated
until the http request is created. This overrides any values currently configured in the builder. The query parameters
MUST NOT be URL encoded.
Justification of requirements: The query parameters must not be encoded when they are configured because some HTTP implementations perform this encoding automatically.
rawQueryParameters in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder removeQueryParameter(String paramName)
removeQueryParameter in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder clearQueryParameters()
clearQueryParameters in interface SdkHttpRequest.BuilderSdkHttpMethod method()
method(SdkHttpMethod).method in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder method(SdkHttpMethod httpMethod)
SdkHttpRequest.method() to be used in the created HTTP request. This is not validated
until the http request is created.method in interface SdkHttpRequest.Builderdefault Optional<String> firstMatchingHeader(String header)
This is useful for headers like 'Content-Type' or 'Content-Length' of which there is expected to be only one value present.
This is equivalent to invoking SdkHttpUtils.firstMatchingHeader(Map, String)
firstMatchingHeader in interface SdkHttpRequest.Builderheader - The header to search for (case insensitively).Map<String,List<String>> headers()
headers(Map),
putHeader(String, String) and putHeader(String, List).headers in interface SdkHttpRequest.Builderdefault SdkHttpFullRequest.Builder putHeader(String headerName, String headerValue)
This completely OVERRIDES any values already configured with this header name in the builder.
putHeader in interface SdkHttpRequest.BuilderheaderName - The name of the header to add (eg. "Host")headerValue - The value for the headerSdkHttpFullRequest.Builder putHeader(String headerName, List<String> headerValues)
This completely OVERRIDES any values already configured with this header name in the builder.
putHeader in interface SdkHttpRequest.BuilderheaderName - The name of the header to addheaderValues - The values for the headerSdkHttpFullRequest.Builder appendHeader(String headerName, String headerValue)
This will ADD the value to any existing values already configured with this header name in the builder.
appendHeader in interface SdkHttpRequest.BuilderheaderName - The name of the header to addheaderValue - The value for the headerSdkHttpFullRequest.Builder headers(Map<String,List<String>> headers)
SdkHttpHeaders.headers() to be used in the created HTTP request. This is not validated
until the http request is created. This overrides any values currently configured in the builder.headers in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder removeHeader(String headerName)
removeHeader in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder clearHeaders()
clearHeaders in interface SdkHttpRequest.BuilderSdkHttpFullRequest.Builder contentStreamProvider(ContentStreamProvider contentStreamProvider)
ContentStreamProvider for this request.contentStreamProvider - The ContentStreamProvider.ContentStreamProvider contentStreamProvider()
ContentStreamProvider for this request.SdkHttpFullRequest.Builder copy()
copy in interface CopyableBuilder<SdkHttpRequest.Builder,SdkHttpRequest>SdkHttpFullRequest.Builder applyMutation(Consumer<SdkHttpRequest.Builder> mutator)
applyMutation in interface SdkBuilder<SdkHttpRequest.Builder,SdkHttpRequest>SdkHttpFullRequest build()
build in interface Buildablebuild in interface SdkBuilder<SdkHttpRequest.Builder,SdkHttpRequest>Copyright © 2019. All rights reserved.