Interface InterceptedWebResponseBody

All Superinterfaces:
InterceptedResponseBody

public interface InterceptedWebResponseBody extends InterceptedResponseBody

An intercepted Web response body with payload encoding support.

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

Since:
1.12
Author:
Jeremy Kuhn
  • Method Details

    • transform

      Description copied from interface: InterceptedResponseBody

      Transforms the response payload publisher.

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

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

      <T> OutboundDataEncoder<T> encoder()

      Returns an encoder to encode a payload based on the content type of the response.

      Type Parameters:
      T - the type to encode
      Returns:
      a data encoder
    • encoder

      <T> OutboundDataEncoder<T> encoder(Class<T> type)

      Returns an encoder to encode a payload of the specified type based on the content type of the response.

      Type Parameters:
      T - the type to encode
      Parameters:
      type - a class of T
      Returns:
      a data encoder
    • encoder

      <T> OutboundDataEncoder<T> encoder(Type type)

      Returns an encoder to encode a payload of the specified type based on the content type of the response.

      Type Parameters:
      T - the type to encode
      Parameters:
      type - the type to encode
      Returns:
      a data encoder