Interface RequestBody


public interface RequestBody

Represents the payload body of a client request in a server exchange.

The request body basically provides multiple ways to consume the request payload depending on the request content type.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Details

    • transform

      RequestBody transform(Function<org.reactivestreams.Publisher<io.netty.buffer.ByteBuf>,org.reactivestreams.Publisher<io.netty.buffer.ByteBuf>> transformer)

      Transforms the payload publisher.

      This can be used in an exchange interceptor in order to decorate the request data publisher.

      Parameters:
      transformer - a request payload publisher transformer
      Returns:
      the request body
    • raw

      InboundData<io.netty.buffer.ByteBuf> raw() throws IllegalStateException

      Returns a raw payload consumer.

      Returns:
      the raw data
      Throws:
      IllegalStateException - if the payload has already been consumed using another decoder
    • string

      Returns a string payload consumer.

      Returns:
      the string data
      Throws:
      IllegalStateException - if the payload has already been consumed using another decoder
    • multipart

      RequestBody.Multipart<? extends Part> multipart() throws IllegalStateException

      Returns a multipart/form-data payload consumer.

      Returns:
      body a multipart/form-data payload consumer
      Throws:
      IllegalStateException - if the payload has already been consumed using another decoder
    • urlEncoded

      Returns an application/x-www-form-urlencoded payload consumer.

      Returns:
      body an application/x-www-form-urlencoded payload consumer
      Throws:
      IllegalStateException - if the payload has already been consumed using another decoder