Interface ClientResponse.Headers
- All Known Implementing Classes:
ClientResponseWrapper.HeadersWrapper
- Enclosing interface:
- ClientResponse
public static interface ClientResponse.Headers
Represents the headers of the HTTP response.- See Also:
ClientResponse.headers()
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpHeaders
asHttpHeaders()
Return the headers as anHttpHeaders
instance.OptionalLong
contentLength()
Return the length of the body in bytes, as specified by theContent-Length
header.Optional<MediaType>
contentType()
Return the media type of the body, as specified by theContent-Type
header.List<String>
header(String headerName)
Return the header value(s), if any, for the header of the given name.
Method Detail
contentLength
OptionalLong contentLength()
Return the length of the body in bytes, as specified by theContent-Length
header.
contentType
Optional<MediaType> contentType()
Return the media type of the body, as specified by theContent-Type
header.
header
List<String> header(String headerName)
Return the header value(s), if any, for the header of the given name.Return an empty list if no header values are found.
- Parameters:
headerName
- the header name
asHttpHeaders
HttpHeaders asHttpHeaders()
Return the headers as anHttpHeaders
instance.