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
ConstructorDescriptionContentModifyingOperationPreprocessor
(ContentModifier contentModifier) Create a newContentModifyingOperationPreprocessor
that will apply the givencontentModifier
to 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 newContentModifyingOperationPreprocessor
that will apply the givencontentModifier
to the operation's request or response.- Parameters:
contentModifier
- the contentModifier
-
-
Method Details
-
preprocess
Description copied from interface:OperationPreprocessor
Processes the givenrequest
.- Specified by:
preprocess
in interfaceOperationPreprocessor
- Parameters:
request
- the request to process- Returns:
- the processed request
-
preprocess
Description copied from interface:OperationPreprocessor
Processes the givenresponse
.- Specified by:
preprocess
in interfaceOperationPreprocessor
- Parameters:
response
- the response to process- Returns:
- the processed response
-