You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`removeMatchingHeaders` on `Preprocessors` removes any headers from the request or response where the name matches any of the given regular expression patterns.
114
+
You can use `modifyHeaders` on `Preprocessors` to add, set, and remove request or response headers.
117
115
118
116
119
117
@@ -125,13 +123,6 @@ Any occurrences that match a regular expression are replaced.
Copy file name to clipboardExpand all lines: spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/HeaderRemovingOperationPreprocessor.java
Copy file name to clipboardExpand all lines: spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/HeadersModifyingOperationPreprocessor.java
+14-23
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,12 @@
30
30
importorg.springframework.util.Assert;
31
31
32
32
/**
33
-
* An {@link OperationPreprocessor} that can be used to modify a request's
34
-
* {@link OperationRequest#getHeaders()} by adding, setting, and removing headers.
33
+
* An {@link OperationPreprocessor} that modifies a request or response by adding,
Copy file name to clipboardExpand all lines: spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/HeaderRemovingOperationPreprocessorTests.java
0 commit comments