You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support the HTTP QUERY method (RFC 10008) in @RequestMapping / RequestMethod #36988
RFC 10008 (Proposed Standard; IANA-registered) defines QUERY — a safe, idempotent, cacheable HTTP method carrying a request body whose content defines the query.
Problem: Spring MVC / WebFlux route declarations select on the RequestMethod enum (GET/HEAD/POST/PUT/PATCH/DELETE/OPTIONS/TRACE) via @RequestMapping(method = …) and the @GetMapping/@PostMapping shortcuts. There is no RequestMethod.QUERY, so a handler cannot be declaratively mapped to QUERY — the alternatives are matching all methods and inspecting request.getMethod(), or a custom RequestMappingHandlerMapping.
Ask: add RequestMethod.QUERY (and a way to declare it, e.g. @RequestMapping(method = RequestMethod.QUERY)), routed through the request-mapping infrastructure, with the handler able to read the request body, and treated as safe/idempotent where the framework branches on method. (Note: the obvious shortcut name @QueryMapping is already taken by Spring GraphQL, so a different name or plain @RequestMapping would be needed.)
Supporting HTTP QUERY likely touches more than RequestMethod. It may also need coverage in request mapping condition parsing, client-side APIs such as WebClient/RestClient, and server adapters that validate method tokens. It would be helpful to decide whether Spring should expose QUERY as a first-class enum value or document a generic custom-method path for newer RFC methods.
Activity
hiSandog commentedon Jul 1, 2026
Supporting HTTP QUERY likely touches more than
RequestMethod. It may also need coverage in request mapping condition parsing, client-side APIs such asWebClient/RestClient, and server adapters that validate method tokens. It would be helpful to decide whether Spring should expose QUERY as a first-class enum value or document a generic custom-method path for newer RFC methods.desiderantes commentedon Jul 1, 2026
I have a PR for this already, I'd appreciate any suggestions: #34993