GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Test and document HTTP QUERY support by kumarprabhashanand · Pull Request #1451 · spring-cloud/spring-cloud-openfeign

Conversation

@kumarprabhashanand

@kumarprabhashanand kumarprabhashanand commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Adds tests and documents which HTTP clients can send QUERY.

Spring Framework 7.1 adds RequestMethod.QUERY for the HTTP QUERY method (RFC 10008), and Feign 13.14 adds Request.HttpMethod.QUERY (OpenFeign/feign#3454). This project uses Feign 13.17, and SpringMvcContract converts the Spring method with Request.HttpMethod.valueOf(...), so @RequestMapping(method = RequestMethod.QUERY) already works.

Changes:

  • SpringMvcContractTests: a QUERY method with a @RequestBody maps to method QUERY with that body.
  • FeignHttpClientTests (Apache HttpClient 5) and FeignHttp2ClientTests (Java HTTP client): an end-to-end testQuery through a load-balanced @FeignClient.
  • QuerySecurityConfiguration (test only): allows QUERY in those test apps, since Spring Security's StrictHttpFirewall rejects it by default (RequestRejectedException).
  • Docs: an "HTTP QUERY Support" section under "Spring @RequestMapping Support". The default HttpURLConnection based 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kumarprabhashanand
Test and document HTTP QUERY support
a8f3fef
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 <[email protected]>
@spring-cloud-issues spring-cloud-issues added the waiting-for-triage label Oct 23, 2026
@ryanjbaxter ryanjbaxter added task and removed waiting-for-triage labels Oct 23, 2026
@ryanjbaxter ryanjbaxter added this to 2026.0.0-RC2 Oct 23, 2026
@ryanjbaxter ryanjbaxter added this to the 5.1.0-RC2 milestone Oct 23, 2026
@github-project-automation github-project-automation Bot moved this to Todo in 2026.0.0-RC2 Oct 23, 2026
@ryanjbaxter
ryanjbaxter merged commit 154979b into spring-cloud:main Oct 23, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-project-automation github-project-automation Bot moved this from Todo to Done in 2026.0.0-RC2 Oct 23, 2026
@kumarprabhashanand kumarprabhashanand mentioned this pull request Oct 26, 2026
Allow the HTTP QUERY method in the default firewalls spring-projects/spring-security#19995
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

task

Projects

No open projects
2026.0.0-RC2
Status: Done

Milestone

5.1.0-RC2

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@kumarprabhashanand @ryanjbaxter @spring-cloud-issues
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.