Interface SdkHttpFullResponse
- All Superinterfaces:
SdkHttpHeaders,SdkHttpResponse,Serializable,ToCopyableBuilder<SdkHttpResponse.Builder,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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for aDefaultSdkHttpFullResponse. -
Method Summary
Modifier and TypeMethodDescriptionstatic SdkHttpFullResponse.Builderbuilder()content()Returns the optional stream containing the payload data returned by the service.Take this object and create a builder that contains all of the current property values of this object.Methods inherited from interface software.amazon.awssdk.http.SdkHttpHeaders
firstMatchingHeader, firstMatchingHeader, forEachHeader, headers, matchingHeaders, numHeadersMethods inherited from interface software.amazon.awssdk.http.SdkHttpResponse
isSuccessful, statusCode, statusTextMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
builder
- Returns:
- Builder instance to construct a
DefaultSdkHttpFullResponse.
-
toBuilder
SdkHttpFullResponse.Builder toBuilder()Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse> - Returns:
- a builder for type T
-
content
Optional<AbortableInputStream> content()Returns the optional stream containing the payload data returned by the service. Note: anAbortableInputStreamis 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.
-