Package software.amazon.awssdk.http
Interface SdkHttpResponse.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<SdkHttpResponse.Builder,
,SdkHttpResponse> SdkBuilder<SdkHttpResponse.Builder,
,SdkHttpResponse> SdkHttpHeaders
- All Known Subinterfaces:
SdkHttpFullResponse.Builder
- Enclosing interface:
SdkHttpResponse
public static interface SdkHttpResponse.Builder
extends CopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>, SdkHttpHeaders
Builder for a
DefaultSdkHttpFullResponse
.-
Method Summary
Modifier and TypeMethodDescriptionappendHeader
(String headerName, String headerValue) Add a single header to be included in the created HTTP request.Removes all headers from this builder.headers()
The HTTP headers, exactly as they were configured withheaders(Map)
,putHeader(String, String)
andputHeader(String, List)
.Configure anSdkHttpHeaders.headers()
to be used in the created HTTP response.default SdkHttpResponse.Builder
Add a single header to be included in the created HTTP response.Add a single header with multiple values to be included in the created HTTP response.removeHeader
(String headerName) Remove all values for the requested header from this builder.int
The status text, exactly as it was configured withstatusCode(int)
.statusCode
(int statusCode) Configure anSdkHttpResponse.statusCode()
to be used in the created HTTP response.The status text, exactly as it was configured withstatusText(String)
.statusText
(String statusText) Configure anSdkHttpResponse.statusText()
to be used in the created HTTP response.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.http.SdkHttpHeaders
firstMatchingHeader, firstMatchingHeader, forEachHeader, matchingHeaders, numHeaders
-
Method Details
-
statusText
String statusText()The status text, exactly as it was configured withstatusText(String)
. -
statusText
Configure anSdkHttpResponse.statusText()
to be used in the created HTTP response. This is not validated until the http response is created. -
statusCode
int statusCode()The status text, exactly as it was configured withstatusCode(int)
. -
statusCode
Configure anSdkHttpResponse.statusCode()
to be used in the created HTTP response. This is not validated until the http response is created. -
headers
The HTTP headers, exactly as they were configured withheaders(Map)
,putHeader(String, String)
andputHeader(String, List)
.- Specified by:
headers
in interfaceSdkHttpHeaders
- Returns:
- An unmodifiable map of all headers in this message.
-
putHeader
Add a single header to be included in the created HTTP response.This completely OVERRIDES any values already configured with this header name in the 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 response.This completely OVERRIDES any values already configured with this header name in the 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.
- 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 response. This is not validated until the http response is created. This overrides any values currently configured in the builder. -
removeHeader
Remove all values for the requested header from this builder. -
clearHeaders
SdkHttpResponse.Builder clearHeaders()Removes all headers from this builder.
-