Skip to content

Commit b4be34b

Browse files
committed
Remove support for modifying request parameters
Request parameters are a server-side constructor, specific to the servlet specification. Rather than modifying request parameters the query string of the URI or the form URL encoded content of the body should be modified instead. Closes gh-846
1 parent a5e466b commit b4be34b

File tree

4 files changed

+0
-340
lines changed

4 files changed

+0
-340
lines changed

docs/src/docs/asciidoc/customizing-requests-and-responses.adoc

-7
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ Any occurrences that match a regular expression are replaced.
123123

124124

125125

126-
[[customizing-requests-and-responses-preprocessors-modify-request-parameters]]
127-
==== Modifying Request Parameters
128-
129-
You can use `modifyParameters` on `Preprocessors` to add, set, and remove request parameters.
130-
131-
132-
133126
[[customizing-requests-and-responses-preprocessors-modify-uris]]
134127
==== Modifying URIs
135128

spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/ParametersModifyingOperationPreprocessor.java

-176
This file was deleted.

spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/Preprocessors.java

-10
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,6 @@ public static OperationPreprocessor replacePattern(Pattern pattern, String repla
137137
return new ContentModifyingOperationPreprocessor(new PatternReplacingContentModifier(pattern, replacement));
138138
}
139139

140-
/**
141-
* Returns a {@code ParametersModifyingOperationPreprocessor} that can then be
142-
* configured to modify the parameters of the request.
143-
* @return the preprocessor
144-
* @since 1.1.0
145-
*/
146-
public static ParametersModifyingOperationPreprocessor modifyParameters() {
147-
return new ParametersModifyingOperationPreprocessor();
148-
}
149-
150140
/**
151141
* Returns a {@code HeadersModifyingOperationPreprocessor} that can then be configured
152142
* to modify the headers of the request or response.

spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/ParametersModifyingOperationPreprocessorTests.java

-147
This file was deleted.

0 commit comments

Comments
 (0)