Interface WebRequestBody

All Superinterfaces:
RequestBody

public interface WebRequestBody extends 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:
  • 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 interface RequestBody
      Parameters:
      transformer - a request payload publisher transformer
      Returns:
      the request body
    • decoder

      <A> InboundDataDecoder<A> decoder(Class<A> type)

      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

      <A> InboundDataDecoder<A> decoder(Type type)

      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

      RequestBody.Multipart<? extends WebPart> multipart() throws IllegalStateException
      Description copied from interface: RequestBody

      Returns a multipart/form-data payload consumer.

      Specified by:
      multipart in interface RequestBody
      Returns:
      body a multipart/form-data payload consumer
      Throws:
      IllegalStateException - if the payload has already been consumed using another decoder