类 ClientResponseWrapper.HeadersWrapper
- java.lang.Object
- org.springframework.web.reactive.function.client.support.ClientResponseWrapper.HeadersWrapper
- 所有已实现的接口:
ClientResponse.Headers
public static class ClientResponseWrapper.HeadersWrapper extends Object implements ClientResponse.Headers
Implementation of theHeaders
interface that can be subclassed to adapt the headers in aexchange filter function
. All methods default to calling through to the wrapped request.
构造器概要
构造器 构造器 说明 HeadersWrapper(ClientResponse.Headers headers)
Create a newHeadersWrapper
that wraps the given request.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.
构造器详细资料
HeadersWrapper
public HeadersWrapper(ClientResponse.Headers headers)
Create a newHeadersWrapper
that wraps the given request.- 参数:
headers
- the headers to wrap
方法详细资料
contentLength
public OptionalLong contentLength()
从接口复制的说明:ClientResponse.Headers
Return the length of the body in bytes, as specified by theContent-Length
header.- 指定者:
contentLength
在接口中ClientResponse.Headers
contentType
public Optional<MediaType> contentType()
从接口复制的说明:ClientResponse.Headers
Return the media type of the body, as specified by theContent-Type
header.- 指定者:
contentType
在接口中ClientResponse.Headers
header
public List<String> header(String headerName)
从接口复制的说明:ClientResponse.Headers
Return the header value(s), if any, for the header of the given name.Return an empty list if no header values are found.
- 指定者:
header
在接口中ClientResponse.Headers
- 参数:
headerName
- the header name
asHttpHeaders
public HttpHeaders asHttpHeaders()
从接口复制的说明:ClientResponse.Headers
Return the headers as anHttpHeaders
instance.- 指定者:
asHttpHeaders
在接口中ClientResponse.Headers