- 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
Modifier and TypeInterfaceDescriptionstatic interface
A multipart/form-data consumer with payload decoding support.Nested classes/interfaces inherited from interface io.inverno.mod.http.server.RequestBody
RequestBody.Multipart<A extends Part>, RequestBody.UrlEncoded
-
Method Summary
Modifier and TypeMethodDescription<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.RequestBody.Multipart
<? extends WebPart> 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:RequestBody
Transforms the payload publisher.
This can be used in an exchange interceptor in order to decorate the request data publisher.
- Specified by:
transform
in interfaceRequestBody
- Parameters:
transformer
- a request payload publisher transformer- 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:RequestBody
Returns a multipart/form-data payload consumer.
- Specified by:
multipart
in interfaceRequestBody
- Returns:
- body a multipart/form-data payload consumer
- Throws:
IllegalStateException
- if the payload has already been consumed using another decoder
-