Skip to content

Add support for the HTTP QUERY method #32975

Not planned
@odrotbohm

Description

@odrotbohm
Member

It's probably rather early stages, but it would be nice if at some point Spring's web frameworks supported the HTTP QUERY method.

Activity

added
in: webIssues in web modules (web, webmvc, webflux, websocket)
on Jun 6, 2024
bclozel

bclozel commented on Jun 6, 2024

@bclozel
Member

Do we know if this method is supported by HTTP clients and servers already?

odrotbohm

odrotbohm commented on Jun 6, 2024

@odrotbohm
MemberAuthor

Node 22.2 apparently already shipped it. I didn't file the ticket for immediate resolution, I just thought it would be nice to keep track of for a potential 7.0 at some point.

bclozel

bclozel commented on Jun 6, 2024

@bclozel
Member

I meant servers that Spring Framework uses.

added and removed on Jun 6, 2024
bclozel

bclozel commented on Jun 7, 2024

@bclozel
Member

I have tested this and this already works already for functional handlers (both WebFlux and MVC). The annotation model is not supported at the moment because RequestMethod is an enum. We could consider expanding support in various places (including clients) or generally allowing custom methods as well.

I'll move this to the backlog until we get more demand for this and concrete use cases.

added this to the General Backlog milestone on Jun 7, 2024
desiderantes

desiderantes commented on Aug 23, 2024

@desiderantes

Don't have any public projects, but for what is worth:

  • I have internal projects that plan to use QUERY for GraphQL, because we want our cache to store those results for some services
  • We have some POST endpoints that would work better as QUERY.
  • We have tooling that allows to set behaviour for caching of custom methods, but blessing a whitelist is extremely annoying across team boundaries.
  • GET query params are usually inadequate for more complex forms of querying, and passing a body for GET sometimes fails in annoying ways (like silently dropping the body if a middleware decides to). Failing to support QUERY is explicit and can be handled better.

So framework support would be a great help.

19 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anothertype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @bclozel@odrotbohm@snicoll@vpavic@desiderantes

      Issue actions

        Add support for the HTTP QUERY method · Issue #32975 · spring-projects/spring-framework