Interface BodyTransformer


  • @Unstable
    public interface BodyTransformer
    A synchronous function that transforms an HTTP body entity.
    • Method Detail

      • consumes

        default boolean consumes​(MediaType mediaType)
        Returns:
        whether this transformer consumes the mediaType, mediaType can be null when the HTTP head does not present a body, the default implementation returns true
      • produces

        default MediaType produces​(MediaType mediaType)
        Returns:
        the media type produced by this transformer, the default implementation returns the same media type
      • transform

        default Future<Body> transform​(Body body)
        Return the future body, transformed. The default implementation returns the same body.
        Parameters:
        body - the body to rewrite
        Returns:
        a future of the transformed body