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
ConstructorsConstructorDescriptionHeadersWrapper(ClientResponse.Headers headers) Create a newHeadersWrapperthat wraps the given request. -
Method Summary
Modifier and TypeMethodDescriptionReturn the headers as anHttpHeadersinstance.Return the length of the body in bytes, as specified by theContent-Lengthheader.Return the media type of the body, as specified by theContent-Typeheader.Return the header value(s), if any, for the header of the given name.
-
Constructor Details
-
HeadersWrapper
Create a newHeadersWrapperthat wraps the given request.- Parameters:
headers- the headers to wrap
-
-
Method Details
-
contentLength
Description copied from interface:ClientResponse.HeadersReturn the length of the body in bytes, as specified by theContent-Lengthheader.- Specified by:
contentLengthin interfaceClientResponse.Headers
-
contentType
Description copied from interface:ClientResponse.HeadersReturn the media type of the body, as specified by theContent-Typeheader.- Specified by:
contentTypein interfaceClientResponse.Headers
-
header
Description copied from interface:ClientResponse.HeadersReturn 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:
headerin interfaceClientResponse.Headers- Parameters:
headerName- the header name
-
asHttpHeaders
Description copied from interface:ClientResponse.HeadersReturn the headers as anHttpHeadersinstance.- Specified by:
asHttpHeadersin interfaceClientResponse.Headers
-