接口 ClientResponse.Headers
- 封闭接口:
- ClientResponse
public static interface ClientResponse.Headers
Represents the headers of the HTTP response.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 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.
方法详细资料
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.
- 参数:
headerName
- the header name
asHttpHeaders
HttpHeaders asHttpHeaders()
Return the headers as anHttpHeaders
instance.