Package software.amazon.awssdk.http
Interface SdkHttpResponse
-
- All Superinterfaces:
SdkHttpHeaders
,Serializable
,ToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>
- All Known Subinterfaces:
SdkHttpFullResponse
@Immutable public interface SdkHttpResponse extends ToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>, SdkHttpHeaders, Serializable
An immutable HTTP response without access to the response body.SdkHttpFullResponse
should be used when access to a response body stream is required.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SdkHttpResponse.Builder
Builder for aDefaultSdkHttpFullResponse
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SdkHttpFullResponse.Builder
builder()
default boolean
isSuccessful()
If we get back any 2xx status code, then we know we should treat the service call as successful.int
statusCode()
Returns the HTTP status code (eg.Optional<String>
statusText()
Returns the HTTP status text returned by the service.-
Methods inherited from interface software.amazon.awssdk.http.SdkHttpHeaders
firstMatchingHeader, firstMatchingHeader, forEachHeader, headers, matchingHeaders, numHeaders
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy, toBuilder
-
-
-
-
Method Detail
-
builder
static SdkHttpFullResponse.Builder builder()
- Returns:
- Builder instance to construct a
DefaultSdkHttpFullResponse
.
-
statusText
Optional<String> statusText()
Returns the HTTP status text returned by the service.If this was not provided by the service, empty will be returned.
-
statusCode
int statusCode()
Returns the HTTP status code (eg. 200, 404, etc.) returned by the service.This will always be positive.
-
isSuccessful
default boolean isSuccessful()
If we get back any 2xx status code, then we know we should treat the service call as successful.
-
-