@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, wait
firstMatchingHeader
public static DefaultSdkHttpResponse from(HttpResponse httpResponse)
DefaultSdkHttpResponse
from the details in a HttpResponse
.public Optional<String> statusText()
SdkHttpResponse
If this was not provided by the service, empty will be returned.
statusText
in interface SdkHttpResponse
public int statusCode()
SdkHttpResponse
This will always be positive.
statusCode
in interface SdkHttpResponse
public Map<String,List<String>> headers()
SdkHttpHeaders
This will never be null. If there are no headers an empty map is returned.
headers
in interface SdkHttpHeaders
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.