- All Superinterfaces:
RequestBody
A request body with payload decoding support.
Implementors should rely on MediaTypeConverter to decode a payload based on the content type of the request.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.inverno.mod.http.server.RequestBody
RequestBody.Multipart<A extends Part>, RequestBody.UrlEncoded -
Method Summary
Modifier and TypeMethodDescriptionTransforms the payload publisher to subscribe to the specified publisher after payload publisher completion.Transforms the payload publisher to subscribe to the specified publisher before subscribing to the payload publisher.<A> InboundDataDecoder<A> Returns a decoder to decode the payload to the specified type based on the content type of the request.<A> InboundDataDecoder<A> Returns a decoder to decode the payload to the specified type based on the content type of the request.Returns a multipart/form-data payload consumer.Transforms the payload publisher.Methods inherited from interface io.inverno.mod.http.server.RequestBody
raw, string, urlEncoded
-
Method Details
-
transform
Description copied from interface:RequestBodyTransforms the payload publisher.
This can be used in an exchange interceptor in order to decorate the request data publisher.
- Specified by:
transformin interfaceRequestBody- Parameters:
transformer- a request payload publisher transformer- Returns:
- the request body
-
before
Description copied from interface:RequestBodyTransforms the payload publisher to subscribe to the specified publisher before subscribing to the payload publisher.
This basically allows to perform actions before the request body is actually sent.
- Specified by:
beforein interfaceRequestBody- Parameters:
before- the publisher to subscribe before the request body publisher- Returns:
- the request body
-
after
Description copied from interface:RequestBodyTransforms the payload publisher to subscribe to the specified publisher after payload publisher completion.
This basically allows to perform actions after the request body has been sent.
- Specified by:
afterin interfaceRequestBody- Parameters:
after- the publisher to subscribe before the request body publisher- Returns:
- the request body
-
decoder
Returns a decoder to decode the payload to the specified type based on the content type of the request.
- Type Parameters:
A- the decoded type- Parameters:
type- a class of A- Returns:
- a decoder
-
decoder
Returns a decoder to decode the payload to the specified type based on the content type of the request.
- Type Parameters:
A- the decoded type- Parameters:
type- the decoded type- Returns:
- a decoder
-
multipart
Description copied from interface:RequestBodyReturns a multipart/form-data payload consumer.
- Specified by:
multipartin interfaceRequestBody- Returns:
- body a multipart/form-data payload consumer
- Throws:
IllegalStateException- if the payload has already been consumed using another decoder
-