Class PrettyPrintingContentModifier
java.lang.Object
org.springframework.restdocs.operation.preprocess.PrettyPrintingContentModifier
- All Implemented Interfaces:
ContentModifier
A
ContentModifier
that modifies the content by pretty printing it.- Author:
- Andy Wilkinson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
modifyContent
(byte[] originalContent, org.springframework.http.MediaType contentType) Returns modified content based on the givenoriginalContent
.
-
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 givenoriginalContent
.- Specified by:
modifyContent
in interfaceContentModifier
- Parameters:
originalContent
- the original contentcontentType
- the type of the original content, may benull
- Returns:
- the modified content
-