- All Superinterfaces:
ResponseBody
A Web response body with payload decoding support.
Implementors should rely on MediaTypeConverter
to decode a payload based on the content type of the response.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescription<T> InboundDataDecoder
<T> Returns a decoder to decode the payload to the specified type based on the content type of the response.<T> InboundDataDecoder
<T> Returns a decoder to decode the payload to the specified type based on the content type of the response.Transforms the payload publisher.Methods inherited from interface io.inverno.mod.http.client.ResponseBody
raw, string
-
Method Details
-
transform
WebResponseBody transform(Function<Publisher<ByteBuf>, Publisher<ByteBuf>> transformer) throws IllegalStateExceptionDescription copied from interface:ResponseBody
Transforms the payload publisher.
This can be used to decorate the response data publisher before it has been subscribed to.
- Specified by:
transform
in interfaceResponseBody
- Parameters:
transformer
- a payload publisher transformer- Returns:
- the response body
- Throws:
IllegalStateException
- if the response payload publisher has already been subscribed
-
decoder
Returns a decoder to decode the payload to the specified type based on the content type of the response.
- Type Parameters:
T
- the decoded type- Parameters:
type
- a class of A- Returns:
- a data decoder
-
decoder
Returns a decoder to decode the payload to the specified type based on the content type of the response.
- Type Parameters:
T
- the decoded type- Parameters:
type
- the decoded type- Returns:
- a data decoder
-