Module io.inverno.mod.web.client
Package io.inverno.mod.web.client
Interface InterceptedWebResponseBody
- All Superinterfaces:
InterceptedResponseBody
An intercepted Web response body with payload encoding support.
Implementors should rely on MediaTypeConverter
to encode a payload based on the content type of the response.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.inverno.mod.http.client.InterceptedResponseBody
InterceptedResponseBody.ResourceData
-
Method Summary
Modifier and TypeMethodDescription<T> OutboundDataEncoder
<T> encoder()
Returns an encoder to encode a payload based on the content type of the response.<T> OutboundDataEncoder
<T> Returns an encoder to encode a payload of the specified type based on the content type of the response.<T> OutboundDataEncoder
<T> Returns an encoder to encode a payload of the specified type based on the content type of the response.Transforms the response payload publisher.Methods inherited from interface io.inverno.mod.http.client.InterceptedResponseBody
empty, raw, resource, string
-
Method Details
-
transform
InterceptedWebResponseBody transform(Function<Publisher<ByteBuf>, Publisher<ByteBuf>> transformer) throws IllegalStateExceptionDescription copied from interface:InterceptedResponseBody
Transforms the response payload publisher.
This can be used in an exchange interceptor in order to decorate the response data publisher.
- Specified by:
transform
in interfaceInterceptedResponseBody
- Parameters:
transformer
- a payload publisher transformer- Returns:
- the response body
- Throws:
IllegalStateException
- if the response payload publisher has already been subscribed
-
encoder
Returns an encoder to encode a payload based on the content type of the response.
- Type Parameters:
T
- the type to encode- Returns:
- a data encoder
-
encoder
Returns an encoder to encode a payload of the specified type based on the content type of the response.
- Type Parameters:
T
- the type to encode- Parameters:
type
- a class of T- Returns:
- a data encoder
-
encoder
Returns an encoder to encode a payload of the specified type based on the content type of the response.
- Type Parameters:
T
- the type to encode- Parameters:
type
- the type to encode- Returns:
- a data encoder
-