@Immutable public interface SdkHttpHeaders
SdkHttpRequest
should be used for requests, and SdkHttpResponse
should be
used for responses.Modifier and Type | Method and Description |
---|---|
default Optional<String> |
firstMatchingHeader(String header)
Perform a case-insensitive search for a particular header in this request, returning the first matching header, if one is
found.
|
Map<String,List<String>> |
headers()
Returns a map of all HTTP headers in this message, sorted in case-insensitive order by their header name.
|
Map<String,List<String>> headers()
This will never be null. If there are no headers an empty map is returned.
default Optional<String> firstMatchingHeader(String header)
This is useful for headers like 'Content-Type' or 'Content-Length' of which there is expected to be only one value present.
This is equivalent to invoking SdkHttpUtils.firstMatchingHeader(Map, String)
header
- The header to search for (case insensitively).Copyright © 2021. All rights reserved.