Module io.inverno.mod.http.client
Package io.inverno.mod.http.client
Interface InterceptableRequestBody
public interface InterceptableRequestBody
An interceptable request body allows to intercept and transform the actual request body sent to the endpoint.
It is exposed in the InterceptableRequest
when the request method allows it, namely POST
, PUT
or DELETE
- Since:
- 1.6
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
-
Method Details
-
transform
InterceptableRequestBody transform(Function<Publisher<ByteBuf>, Publisher<ByteBuf>> transformer) throws IllegalStateExceptionTransforms the request payload publisher.
This can be used in an exchange interceptor in order to decorate the request data publisher.
- Parameters:
transformer
- a payload publisher transformer- Returns:
- the request body
- Throws:
IllegalStateException
- if the request payload publisher has already been subscribed
-