接口 ClientResponse.Headers
- 封闭接口:
- ClientResponse
public static interface ClientResponse.Headers
Represents the headers of the HTTP response.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 HttpHeadersasHttpHeaders()Return the headers as anHttpHeadersinstance.OptionalLongcontentLength()Return the length of the body in bytes, as specified by theContent-Lengthheader.Optional<MediaType>contentType()Return the media type of the body, as specified by theContent-Typeheader.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-Lengthheader.
contentType
Optional<MediaType> contentType()
Return the media type of the body, as specified by theContent-Typeheader.
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 anHttpHeadersinstance.