Class ContentModifyingOperationPreprocessor
java.lang.Object
org.springframework.restdocs.operation.preprocess.ContentModifyingOperationPreprocessor
- All Implemented Interfaces:
OperationPreprocessor
An
OperationPreprocessor that applies a ContentModifier to the content
of the request or response.- Author:
- Andy Wilkinson
-
Constructor Summary
ConstructorsConstructorDescriptionContentModifyingOperationPreprocessor(ContentModifier contentModifier) Create a newContentModifyingOperationPreprocessorthat will apply the givencontentModifierto the operation's request or response. -
Method Summary
Modifier and TypeMethodDescriptionpreprocess(OperationRequest request) Processes the givenrequest.preprocess(OperationResponse response) Processes the givenresponse.
-
Constructor Details
-
ContentModifyingOperationPreprocessor
Create a newContentModifyingOperationPreprocessorthat will apply the givencontentModifierto the operation's request or response.- Parameters:
contentModifier- the contentModifier
-
-
Method Details
-
preprocess
Description copied from interface:OperationPreprocessorProcesses the givenrequest.- Specified by:
preprocessin interfaceOperationPreprocessor- Parameters:
request- the request to process- Returns:
- the processed request
-
preprocess
Description copied from interface:OperationPreprocessorProcesses the givenresponse.- Specified by:
preprocessin interfaceOperationPreprocessor- Parameters:
response- the response to process- Returns:
- the processed response
-