Module io.inverno.mod.http.client
Package io.inverno.mod.http.client
Interface InterceptedRequestBody
public interface InterceptedRequestBody
An intercepted request body allows to intercept and transform the actual request body sent to the endpoint.
It is exposed in the InterceptedRequest
when the request method allows it, namely POST
, PUT
or DELETE
- Since:
- 1.6
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
-
Method Details
-
transform
InterceptedRequestBody 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
-