Interface SdkHttpFullRequest.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<SdkHttpRequest.Builder,
,SdkHttpRequest> SdkBuilder<SdkHttpRequest.Builder,
,SdkHttpRequest> SdkHttpHeaders
,SdkHttpRequest.Builder
- Enclosing interface:
SdkHttpFullRequest
SdkHttpFullRequest
. An instance of this can be created using
SdkHttpFullRequest.builder()
.-
Method Summary
Modifier and TypeMethodDescriptionappendHeader
(String headerName, String headerValue) Add a single header to be included in the created HTTP request.appendRawQueryParameter
(String paramName, String paramValue) Add a single un-encoded query parameter to be included in the created HTTP request.applyMutation
(Consumer<SdkHttpRequest.Builder> mutator) A convenience operator that takes something that will mutate the builder in some way and allows inclusion of it in chaining operations.build()
An immutable object that is created from the properties that have been set on the builder.Removes all headers from this builder.Removes all query parameters from this builder.contentStreamProvider
(ContentStreamProvider contentStreamProvider) Set theContentStreamProvider
for this request.copy()
A shallow copy of this object created by building an immutable T and then transforming it back to a builder.The path, exactly as it was configured withencodedPath(String)
.encodedPath
(String path) Configure anSdkHttpRequest.encodedPath()
to be used in the created HTTP request.headers()
The query parameters, exactly as they were configured withheaders(Map)
,putHeader(String, String)
andputHeader(String, List)
.Configure anSdkHttpHeaders.headers()
to be used in the created HTTP request.host()
The host, exactly as it was configured withhost(String)
.Configure aSdkHttpRequest.host()
to be used in the created HTTP request.method()
The path, exactly as it was configured withmethod(SdkHttpMethod)
.method
(SdkHttpMethod httpMethod) Configure anSdkHttpRequest.method()
to be used in the created HTTP request.port()
The port, exactly as it was configured withport(Integer)
.Configure aSdkHttpRequest.port()
to be used in the created HTTP request.protocol()
The protocol, exactly as it was configured withprotocol(String)
.Configure aSdkHttpRequest.protocol()
to be used in the created HTTP request.default SdkHttpFullRequest.Builder
Add a single header to be included in the created HTTP request.Add a single header 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.putRawQueryParameter
(String paramName, List<String> paramValues) Add a single un-encoded query parameter with multiple values to be included in the created HTTP request.The query parameters, exactly as they were configured withrawQueryParameters(Map)
,putRawQueryParameter(String, String)
andputRawQueryParameter(String, List)
.rawQueryParameters
(Map<String, List<String>> queryParameters) Configure anSdkHttpRequest.rawQueryParameters()
to be used in the created HTTP request.removeHeader
(String headerName) Remove all values for the requested header from this builder.removeQueryParameter
(String paramName) Remove all values for the requested query parameter from this builder.default SdkHttpFullRequest.Builder
Convenience method to set theprotocol()
,host()
,port()
,encodedPath()
and extracts query parameters from aURI
object.Methods inherited from interface software.amazon.awssdk.http.SdkHttpHeaders
firstMatchingHeader, firstMatchingHeader, forEachHeader, matchingHeaders, numHeaders
Methods inherited from interface software.amazon.awssdk.http.SdkHttpRequest.Builder
encodedQueryParameters, forEachRawQueryParameter, numRawQueryParameters
-
Method Details
-
uri
Convenience method to set theprotocol()
,host()
,port()
,encodedPath()
and extracts query parameters from aURI
object.- Specified by:
uri
in interfaceSdkHttpRequest.Builder
- Parameters:
uri
- URI containing protocol, host, port and path.- Returns:
- This builder for method chaining.
-
protocol
String protocol()The protocol, exactly as it was configured withprotocol(String)
.- Specified by:
protocol
in interfaceSdkHttpRequest.Builder
-
protocol
Configure aSdkHttpRequest.protocol()
to be used in the created HTTP request. This is not validated until the http request is created.- Specified by:
protocol
in interfaceSdkHttpRequest.Builder
-
host
String host()The host, exactly as it was configured withhost(String)
.- Specified by:
host
in interfaceSdkHttpRequest.Builder
-
host
Configure aSdkHttpRequest.host()
to be used in the created HTTP request. This is not validated until the http request is created.- Specified by:
host
in interfaceSdkHttpRequest.Builder
-
port
Integer port()The port, exactly as it was configured withport(Integer)
.- Specified by:
port
in interfaceSdkHttpRequest.Builder
-
port
Configure aSdkHttpRequest.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 aURI
, "-1" will be treated as "null" when the http request is created.- Specified by:
port
in interfaceSdkHttpRequest.Builder
-
encodedPath
String encodedPath()The path, exactly as it was configured withencodedPath(String)
.- Specified by:
encodedPath
in interfaceSdkHttpRequest.Builder
-
encodedPath
Configure anSdkHttpRequest.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.
- Specified by:
encodedPath
in interfaceSdkHttpRequest.Builder
-
rawQueryParameters
The query parameters, exactly as they were configured withrawQueryParameters(Map)
,putRawQueryParameter(String, String)
andputRawQueryParameter(String, List)
.- Specified by:
rawQueryParameters
in interfaceSdkHttpRequest.Builder
-
putRawQueryParameter
Add a single un-encoded query parameter to be included in the created HTTP request.This completely OVERRIDES any values already configured with this parameter name in the builder.
- Specified by:
putRawQueryParameter
in interfaceSdkHttpRequest.Builder
- Parameters:
paramName
- The name of the query parameter to addparamValue
- The un-encoded value for the query parameter.
-
appendRawQueryParameter
Add a single un-encoded query parameter to be included in the created HTTP request.This will ADD the value to any existing values already configured with this parameter name in the builder.
- Specified by:
appendRawQueryParameter
in interfaceSdkHttpRequest.Builder
- Parameters:
paramName
- The name of the query parameter to addparamValue
- The un-encoded value for the query parameter.
-
putRawQueryParameter
Add a single un-encoded query parameter with multiple values to be included in the created HTTP request.This completely OVERRIDES any values already configured with this parameter name in the builder.
- Specified by:
putRawQueryParameter
in interfaceSdkHttpRequest.Builder
- Parameters:
paramName
- The name of the query parameter to addparamValues
- The un-encoded values for the query parameter.
-
rawQueryParameters
Configure anSdkHttpRequest.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.
- Specified by:
rawQueryParameters
in interfaceSdkHttpRequest.Builder
-
removeQueryParameter
Remove all values for the requested query parameter from this builder.- Specified by:
removeQueryParameter
in interfaceSdkHttpRequest.Builder
-
clearQueryParameters
SdkHttpFullRequest.Builder clearQueryParameters()Removes all query parameters from this builder.- Specified by:
clearQueryParameters
in interfaceSdkHttpRequest.Builder
-
method
SdkHttpMethod method()The path, exactly as it was configured withmethod(SdkHttpMethod)
.- Specified by:
method
in interfaceSdkHttpRequest.Builder
-
method
Configure anSdkHttpRequest.method()
to be used in the created HTTP request. This is not validated until the http request is created.- Specified by:
method
in interfaceSdkHttpRequest.Builder
-
headers
The query parameters, exactly as they were configured withheaders(Map)
,putHeader(String, String)
andputHeader(String, List)
.- Specified by:
headers
in interfaceSdkHttpHeaders
- Specified by:
headers
in interfaceSdkHttpRequest.Builder
- Returns:
- An unmodifiable map of all headers in this message.
-
putHeader
Add a single header to be included in the created HTTP request.This completely OVERRIDES any values already configured with this header name in the builder.
- Specified by:
putHeader
in interfaceSdkHttpRequest.Builder
- Parameters:
headerName
- The name of the header to add (eg. "Host")headerValue
- The value for the header
-
putHeader
Add a single header with multiple values to be included in the created HTTP request.This completely OVERRIDES any values already configured with this header name in the builder.
- Specified by:
putHeader
in interfaceSdkHttpRequest.Builder
- Parameters:
headerName
- The name of the header to addheaderValues
- The values for the header
-
appendHeader
Add a single header to be included in the created HTTP request.This will ADD the value to any existing values already configured with this header name in the builder.
- Specified by:
appendHeader
in interfaceSdkHttpRequest.Builder
- Parameters:
headerName
- The name of the header to addheaderValue
- The value for the header
-
headers
Configure anSdkHttpHeaders.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.- Specified by:
headers
in interfaceSdkHttpRequest.Builder
-
removeHeader
Remove all values for the requested header from this builder.- Specified by:
removeHeader
in interfaceSdkHttpRequest.Builder
-
clearHeaders
SdkHttpFullRequest.Builder clearHeaders()Removes all headers from this builder.- Specified by:
clearHeaders
in interfaceSdkHttpRequest.Builder
-
contentStreamProvider
Set theContentStreamProvider
for this request.- Parameters:
contentStreamProvider
- The ContentStreamProvider.- Returns:
- This object for method chaining.
-
contentStreamProvider
ContentStreamProvider contentStreamProvider()- Returns:
- The
ContentStreamProvider
for this request.
-
copy
SdkHttpFullRequest.Builder copy()Description copied from interface:CopyableBuilder
A shallow copy of this object created by building an immutable T and then transforming it back to a builder.- Specified by:
copy
in interfaceCopyableBuilder<SdkHttpRequest.Builder,
SdkHttpRequest> - Returns:
- a copy of this object
-
applyMutation
Description copied from interface:SdkBuilder
A convenience operator that takes something that will mutate the builder in some way and allows inclusion of it in chaining operations. For example instead of:Builder builder = ClassBeingBuilt.builder(); builder = Util.addSomeDetailToTheBuilder(builder); ClassBeingBuilt clz = builder.build();
This can be done in a statement:
ClassBeingBuilt = ClassBeingBuilt.builder().applyMutation(Util::addSomeDetailToTheBuilder).build();
- Specified by:
applyMutation
in interfaceSdkBuilder<SdkHttpRequest.Builder,
SdkHttpRequest> - Parameters:
mutator
- the function that mutates the builder- Returns:
- B the mutated builder instance
-
build
SdkHttpFullRequest build()Description copied from interface:SdkBuilder
An immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<SdkHttpRequest.Builder,
SdkHttpRequest> - Returns:
- an instance of T
-