Class ClientHttpResponseDecorator
java.lang.Object
org.springframework.http.client.reactive.ClientHttpResponseDecorator
- All Implemented Interfaces:
ClientHttpResponse
,HttpMessage
,ReactiveHttpInputMessage
Wraps another
ClientHttpResponse
and delegates all methods to it.
Sub-classes can override specific methods selectively.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<DataBuffer>
getBody()
Return the body of the message as aPublisher
.Return a read-only map of response cookies received from the server.Return the headers of this message.getId()
Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.int
Return the HTTP status code (potentially non-standard and not resolvable through theHttpStatus
enum) as an integer.Return the HTTP status code as anHttpStatus
enum value.toString()
-
Constructor Details
-
ClientHttpResponseDecorator
-
-
Method Details
-
getDelegate
-
getId
Description copied from interface:ClientHttpResponse
Return an id that represents the underlying connection, if available, or the request for the purpose of correlating log messages.- Specified by:
getId
in interfaceClientHttpResponse
-
getStatusCode
Description copied from interface:ClientHttpResponse
Return the HTTP status code as anHttpStatus
enum value.- Specified by:
getStatusCode
in interfaceClientHttpResponse
- Returns:
- the HTTP status as an HttpStatus enum value (never
null
) - See Also:
-
getRawStatusCode
public int getRawStatusCode()Description copied from interface:ClientHttpResponse
Return the HTTP status code (potentially non-standard and not resolvable through theHttpStatus
enum) as an integer.- Specified by:
getRawStatusCode
in interfaceClientHttpResponse
- Returns:
- the HTTP status as an integer value
- See Also:
-
getHeaders
Description copied from interface:HttpMessage
Return the headers of this message.- Specified by:
getHeaders
in interfaceHttpMessage
- Returns:
- a corresponding HttpHeaders object (never
null
)
-
getCookies
Description copied from interface:ClientHttpResponse
Return a read-only map of response cookies received from the server.- Specified by:
getCookies
in interfaceClientHttpResponse
-
getBody
Description copied from interface:ReactiveHttpInputMessage
Return the body of the message as aPublisher
.- Specified by:
getBody
in interfaceReactiveHttpInputMessage
- Returns:
- the body content publisher
-
toString
-