-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom HTTP Method on MockServerHttpRequest #25109
Comments
As pointed out by @eleftherias, the change associated with this issue is actually a breaking change for anyone that previously supplied For example, the following used to be supported but now throws an MockServerHttpRequest.method(null, "/").build(); In light of that, perhaps we should reopen this issue to again support @rstoyanchev Thoughts? See also: spring-projects/spring-security#8592 |
My only concern is that Spring Security had no choice but to pass |
Fair enough. Let's just hope there weren't many projects depending on the previous unintentional support for |
….MockServerHttpRequest with org.springframework.mock.http.server.reactive.MockServerHttpRequest for spring-projectsgh-25109
In some cases we'd like to use
MockServerHttpRequest
with methods not in Spring'sHttpMethod
enum (for testing corner cases for example).My scenario was wanting to use
MockServerHttpRequest
with the CONNECT method, which isn't in HttpMethod.When
ServerHttpRequest
receives a request from Reactor Netty it can accept CONNECT as a string method even though it's not in the enum.I believe we should also add a string-based method initialization to
MockServerHttpRequest
.This was originally described in #24820 but I was asked to create a separate issue for this.
@rstoyanchev FYI
The text was updated successfully, but these errors were encountered: