Class ClientResponseWrapper.HeadersWrapper
java.lang.Object
org.springframework.web.reactive.function.client.support.ClientResponseWrapper.HeadersWrapper
- All Implemented Interfaces:
ClientResponse.Headers
- Enclosing class:
- ClientResponseWrapper
public static class ClientResponseWrapper.HeadersWrapper
extends Object
implements ClientResponse.Headers
Implementation of the
Headers
interface that can be subclassed
to adapt the headers in a
exchange filter function
.
All methods default to calling through to the wrapped request.-
Constructor Summary
ConstructorDescriptionHeadersWrapper
(ClientResponse.Headers headers) Create a newHeadersWrapper
that wraps the given request. -
Method Summary
Modifier and TypeMethodDescriptionReturn the headers as anHttpHeaders
instance.Return the length of the body in bytes, as specified by theContent-Length
header.Return the media type of the body, as specified by theContent-Type
header.Return the header value(s), if any, for the header of the given name.
-
Constructor Details
-
HeadersWrapper
Create a newHeadersWrapper
that wraps the given request.- Parameters:
headers
- the headers to wrap
-
-
Method Details
-
contentLength
Description copied from interface:ClientResponse.Headers
Return the length of the body in bytes, as specified by theContent-Length
header.- Specified by:
contentLength
in interfaceClientResponse.Headers
-
contentType
Description copied from interface:ClientResponse.Headers
Return the media type of the body, as specified by theContent-Type
header.- Specified by:
contentType
in interfaceClientResponse.Headers
-
header
Description copied from interface: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.
- Specified by:
header
in interfaceClientResponse.Headers
- Parameters:
headerName
- the header name
-
asHttpHeaders
Description copied from interface:ClientResponse.Headers
Return the headers as anHttpHeaders
instance.- Specified by:
asHttpHeaders
in interfaceClientResponse.Headers
-