@Immutable public final class DefaultSdkHttpResponse extends Object implements SdkHttpResponse
SdkHttpResponse.| Modifier and Type | Method and Description |
|---|---|
static DefaultSdkHttpResponse |
from(HttpResponse httpResponse)
Static factory to create an
DefaultSdkHttpResponse from the details in a HttpResponse. |
Map<String,List<String>> |
headers()
Returns a map of all HTTP headers in this message, sorted in case-insensitive order by their header name.
|
int |
statusCode()
Returns the HTTP status code (eg.
|
Optional<String> |
statusText()
Returns the HTTP status text returned by the service.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfirstMatchingHeaderpublic static DefaultSdkHttpResponse from(HttpResponse httpResponse)
DefaultSdkHttpResponse from the details in a HttpResponse.public Optional<String> statusText()
SdkHttpResponseIf this was not provided by the service, empty will be returned.
statusText in interface SdkHttpResponsepublic int statusCode()
SdkHttpResponseThis will always be positive.
statusCode in interface SdkHttpResponsepublic Map<String,List<String>> headers()
SdkHttpHeadersThis will never be null. If there are no headers an empty map is returned.
headers in interface SdkHttpHeadersCopyright © 2017 Amazon Web Services, Inc. All Rights Reserved.