public static interface SdkHttpFullRequest.Builder extends CopyableBuilder<SdkHttpFullRequest.Builder,SdkHttpFullRequest>
SdkHttpFullRequest
. An instance of this can be created using
SdkHttpFullRequest.builder()
.Modifier and Type | Method and Description |
---|---|
SdkHttpFullRequest.Builder |
clearHeaders()
Removes all headers from this builder.
|
SdkHttpFullRequest.Builder |
clearQueryParameters()
Removes all query parameters from this builder.
|
InputStream |
content()
The content, exactly as it was configured with
content(InputStream) . |
SdkHttpFullRequest.Builder |
content(InputStream content)
Configure an
SdkHttpFullRequest.content() to be used in the created HTTP request. |
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.
|
copy
applyMutation, build
String protocol()
protocol(String)
.SdkHttpFullRequest.Builder protocol(String protocol)
SdkHttpRequest.protocol()
to be used in the created HTTP request. This is not validated until the
http request is created.String host()
host(String)
.SdkHttpFullRequest.Builder host(String host)
SdkHttpRequest.host()
to be used in the created HTTP request. This is not validated until the
http request is created.Integer port()
port(Integer)
.SdkHttpFullRequest.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.String encodedPath()
encodedPath(String)
.SdkHttpFullRequest.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.
Map<String,List<String>> rawQueryParameters()
rawQueryParameters(Map)
,
putRawQueryParameter(String, String)
and putRawQueryParameter(String, List)
.default SdkHttpFullRequest.Builder putRawQueryParameter(String paramName, String paramValue)
This completely overrides any values already configured with this parameter name in the builder.
paramName
- 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.
paramName
- 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.
SdkHttpFullRequest.Builder removeQueryParameter(String paramName)
SdkHttpFullRequest.Builder clearQueryParameters()
SdkHttpMethod method()
method(SdkHttpMethod)
.SdkHttpFullRequest.Builder method(SdkHttpMethod httpMethod)
SdkHttpRequest.method()
to be used in the created HTTP request. This is not validated
until the http request is created.default 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)
header
- The header to search for (case insensitively).Map<String,List<String>> headers()
headers(Map)
,
putHeader(String, String)
and putHeader(String, List)
.default SdkHttpFullRequest.Builder putHeader(String headerName, String headerValue)
This completely overrides any values already configured with this header name in the builder.
headerName
- 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.
headerName
- The name of the header to addheaderValues
- The values 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.SdkHttpFullRequest.Builder removeHeader(String headerName)
SdkHttpFullRequest.Builder clearHeaders()
InputStream content()
content(InputStream)
.SdkHttpFullRequest.Builder content(InputStream content)
SdkHttpFullRequest.content()
to be used in the created HTTP request. This is not validated until
the http request is created.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.