Class PrettyPrintingContentModifier

java.lang.Object
org.springframework.restdocs.operation.preprocess.PrettyPrintingContentModifier
All Implemented Interfaces:
ContentModifier

public class PrettyPrintingContentModifier extends Object implements ContentModifier
A ContentModifier that modifies the content by pretty printing it.
Author:
Andy Wilkinson
  • Constructor Details

    • PrettyPrintingContentModifier

      public PrettyPrintingContentModifier()
  • Method Details

    • modifyContent

      public byte[] modifyContent(byte[] originalContent, org.springframework.http.MediaType contentType)
      Description copied from interface: ContentModifier
      Returns modified content based on the given originalContent.
      Specified by:
      modifyContent in interface ContentModifier
      Parameters:
      originalContent - the original content
      contentType - the type of the original content, may be null
      Returns:
      the modified content