Skip to content

Add RFC 10008 (QUERY HTTP method) support#34993

Open
desiderantes wants to merge 4 commits into
spring-projects:mainfrom
desiderantes:desiderantes/query-method
Open

Add RFC 10008 (QUERY HTTP method) support#34993
desiderantes wants to merge 4 commits into
spring-projects:mainfrom
desiderantes:desiderantes/query-method

Conversation

@desiderantes

@desiderantes desiderantes commented Jun 3, 2025

Copy link
Copy Markdown

This change introduces support for RFC 10008: The HTTP QUERY Method.

Although initially described as just a "safe GET with a body", the QUERY method unlocks the ability to send complex payloads that do not represent a mutation, and can be handled in a safe, idempotent way. Think of it as a replacement for usecases like complex query parameters in URLs, POST requests that do not mutate anything (but have to be treated as such by all other components in the network roundtrip, so no caching, etc.), and non-mutating HTML Form submission that can use an appropriate encoding for the body.

Fixes #32975

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 3, 2025
@desiderantes desiderantes force-pushed the desiderantes/query-method branch from f640f86 to 6f9aa37 Compare June 3, 2025 22:31
@desiderantes

Copy link
Copy Markdown
Author

Will keep this one in draft until the standard is published, but I'd appreciate any review

@bclozel bclozel self-assigned this Jun 4, 2025
@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 5, 2025
@bclozel bclozel added this to the General Backlog milestone Jun 5, 2025
@desiderantes desiderantes force-pushed the desiderantes/query-method branch from 258303c to e7e5a72 Compare September 9, 2025 22:06
@desiderantes desiderantes force-pushed the desiderantes/query-method branch from e7e5a72 to 95c6c7a Compare September 24, 2025 00:38
@bclozel bclozel added the status: blocked An issue that's blocked on an external project change label Oct 22, 2025
@desiderantes desiderantes force-pushed the desiderantes/query-method branch from 95c6c7a to a723d04 Compare November 11, 2025 23:19
@desiderantes desiderantes force-pushed the desiderantes/query-method branch 2 times, most recently from 7c5025d to 6c71421 Compare June 15, 2026 22:29
@desiderantes

Copy link
Copy Markdown
Author

the draft has been approved for publication, so I'm marking this PR as ready for review.

@desiderantes desiderantes marked this pull request as ready for review June 15, 2026 22:32
@bclozel

bclozel commented Jun 16, 2026

Copy link
Copy Markdown
Member

the draft has been approved for publication, so I'm marking this PR as ready for review.

That's a 404 now, we can use https://www.rfc-editor.org/info/rfc10008/ instead as a reference.

@anupamsingh24

Copy link
Copy Markdown

In which spring boot version will this change be available?

@desiderantes desiderantes force-pushed the desiderantes/query-method branch from 0a54a98 to b72dd80 Compare June 29, 2026 17:32
@desiderantes desiderantes changed the title Add QUERY HTTP method Add RFC 1008 (QUERY HTTP method) support Jul 1, 2026
@desiderantes desiderantes changed the title Add RFC 1008 (QUERY HTTP method) support Add RFC 10008 (QUERY HTTP method) support Jul 1, 2026
Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes93@gmail.com>
Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes93@gmail.com>
Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes93@gmail.com>
@desiderantes desiderantes force-pushed the desiderantes/query-method branch from b72dd80 to 60c1d1b Compare July 1, 2026 21:40
* {@link PutMapping @PutMapping}, {@link DeleteMapping @DeleteMapping}, or
* {@link PatchMapping @PatchMapping}.
* {@link PutMapping @PutMapping}, {@link DeleteMapping @DeleteMapping},
* {@link PatchMapping @PatchMapping}, or {@link QueryMapping}.

@JustRed23 JustRed23 Jul 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this comment is inconsistent with the rest of the mappings. This would read as @PutMapping, @DeleteMaping, @PatchMapping or QueryMapping

@bclozel

bclozel commented Jul 3, 2026

Copy link
Copy Markdown
Member

We will do a thorough review of this PR and synchronize with other Spring projects. There are many aspects to consider (like the fact that @QueryMapping already exists in spring graphql) but we would like to support this in time for Spring Framework 7.1 in November. We will post updates here, no further changes or reviews are needed at this time on this PR.

Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes93@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) status: blocked An issue that's blocked on an external project change type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for the HTTP QUERY method

9 participants