Repository navigation
Test and document HTTP QUERY support - #1451
Merged
ryanjbaxter merged 1 commit intoOct 23, 2026
Merged
Conversation
Spring Framework 7.1 adds RequestMethod.QUERY (RFC 10008) and Feign 13.14 adds Request.HttpMethod.QUERY, so SpringMvcContract already maps @RequestMapping(method = RequestMethod.QUERY) without code changes. Add a contract test, and load-balanced end-to-end tests for the Apache HttpClient 5 and Java HTTP clients next to the existing PATCH tests. The test applications allow QUERY in Spring Security's StrictHttpFirewall, which rejects it by default. Document how to declare a QUERY method and which clients can send it. The default HttpURLConnection-based client cannot. Signed-off-by: Prabhash <8548359+kumarprabhashanand@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds tests and documents which HTTP clients can send QUERY.
Spring Framework 7.1 adds
RequestMethod.QUERYfor the HTTP QUERY method (RFC 10008), and Feign 13.14 addsRequest.HttpMethod.QUERY(OpenFeign/feign#3454). This project uses Feign 13.17, andSpringMvcContractconverts the Spring method withRequest.HttpMethod.valueOf(...), so@RequestMapping(method = RequestMethod.QUERY)already works.Changes:
SpringMvcContractTests: a QUERY method with a@RequestBodymaps to methodQUERYwith that body.FeignHttpClientTests(Apache HttpClient 5) andFeignHttp2ClientTests(Java HTTP client): an end-to-endtestQuerythrough a load-balanced@FeignClient.QuerySecurityConfiguration(test only): allows QUERY in those test apps, since Spring Security'sStrictHttpFirewallrejects it by default (RequestRejectedException).HttpURLConnectionbased client cannot send QUERY, so it points to Apache HttpClient 5 and Java HTTP client.Validation (locally with Java 17):
./mvnw -pl spring-cloud-openfeign-core test: 463 tests, 0 failures, 0 errors, 7 skipped (existing)./mvnw -pl docs -P docs antora:antora: build succeeded, and the generated page shows the new section