Package software.amazon.awssdk.http
Interface SdkHttpFullResponse
-
- All Superinterfaces:
SdkHttpHeaders
,SdkHttpResponse
,Serializable
,ToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>
@Immutable public interface SdkHttpFullResponse extends SdkHttpResponse
An immutable HTTP response with a possible HTTP body.All implementations of this interface MUST be immutable. Instead of implementing this interface, consider using
builder()
to create an instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SdkHttpFullResponse.Builder
Builder for aDefaultSdkHttpFullResponse
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static SdkHttpFullResponse.Builder
builder()
Optional<AbortableInputStream>
content()
Returns the optional stream containing the payload data returned by the service.SdkHttpFullResponse.Builder
toBuilder()
-
Methods inherited from interface software.amazon.awssdk.http.SdkHttpHeaders
firstMatchingHeader, firstMatchingHeader, forEachHeader, headers, matchingHeaders, numHeaders
-
Methods inherited from interface software.amazon.awssdk.http.SdkHttpResponse
isSuccessful, statusCode, statusText
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
builder
static SdkHttpFullResponse.Builder builder()
- Returns:
- Builder instance to construct a
DefaultSdkHttpFullResponse
.
-
toBuilder
SdkHttpFullResponse.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>
-
content
Optional<AbortableInputStream> content()
Returns the optional stream containing the payload data returned by the service. Note: anAbortableInputStream
is returned instead of anInputStream
. This allows the stream to be aborted before all content is read, which usually means destroying the underlying HTTP connection. This may be implemented differently in other HTTP implementations.When the response does not include payload data, this will return
Optional.empty()
.- Returns:
- The optional stream containing the payload data included in this response, or empty if there is no payload.
-
-