Interface WebResponseBody

All Superinterfaces:
ResponseBody

public interface WebResponseBody extends ResponseBody

A Web response body with payload decoding support.

Implementors should rely on MediaTypeConverter to decode a payload based on the content type of the response.

Since:
1.12
Author:
Jeremy Kuhn
  • Method Details

    • transform

      Description copied from interface: ResponseBody

      Transforms the payload publisher.

      This can be used to decorate the response data publisher before it has been subscribed to.

      Specified by:
      transform in interface ResponseBody
      Parameters:
      transformer - a payload publisher transformer
      Returns:
      the response body
      Throws:
      IllegalStateException - if the response payload publisher has already been subscribed
    • decoder

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

      Returns a decoder to decode the payload to the specified type based on the content type of the response.

      Type Parameters:
      T - the decoded type
      Parameters:
      type - a class of A
      Returns:
      a data decoder
    • decoder

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

      Returns a decoder to decode the payload to the specified type based on the content type of the response.

      Type Parameters:
      T - the decoded type
      Parameters:
      type - the decoded type
      Returns:
      a data decoder