public interface ResponseBody
Represents the response payload received by a client from a server in a client exchange.
The response body basically provides multiple ways to consume the payload depending on the response content type.
- Since:
- 1.6
- Author:
- Jeremy Kuhn
- See Also:
-
Method Details
-
transform
ResponseBody transform(Function<Publisher<ByteBuf>, Publisher<ByteBuf>> transformer) throws IllegalStateExceptionTransforms the payload publisher.
This can be used to decorate the response data publisher before it has been subscribed to.
- Parameters:
transformer
- a payload publisher transformer- Returns:
- the response body
- Throws:
IllegalStateException
- if the response payload publisher has already been subscribed
-
raw
InboundData<ByteBuf> raw()Returns a raw payload consumer.
- Returns:
- the raw data
-
string
Returns a string payload consumer.
- Returns:
- the string data
- Throws:
IllegalStateException
-