Please Document the QUERY method
Description
Express already supports the QUERY method per expressjs/express#5615. Please add it to the documentation, for example, at https://expressjs.com/en/5x/api.html#routing-methods.
I would like to submit it to the list of implementation supporting the QUERY method at IETF/HTTPWG.
Expectations
Update https://expressjs.com/en/4x/api.html#routing-methods and https://expressjs.com/en/5x/api.html#routing-methods to include query.
I believe we were waiting until it stabilized in Node.js. Also we support versions of node that do not have QUERY support so I thought we had discussed waiting on documentation until all versions supported it. cc @jonchurch
Node has supported this since 21.7.2, and it has been backported 20.19.2 (look for llhttp 9.2.0 in the logs). It is probably never going to be ported to version 18. And you support it (with the appropriate Node version ofc).
The reason I had asked was because the QUERY method I-D has been sent to IESG for publication as a proposed standard (which is the last administrative stage for publishing a RFC). https://lists.w3.org/Archives/Public/ietf-http-wg/2025AprJun/0124.html
We can definitely add a note saying that it's only supported in certain versions of Node.js, and I’d be in favor of that
I also have a question about adding the method to the types declaration: https://github.com/expressjs/express/issues/5615#issuecomment-2943235410
It is only stable in node@>=22. While it was added, it does not function correctly. We expose the methods Node.js has, but we have to specifically disable the tests for QUERY under node@22. If we are going to document it, we need to make it clear it does not work as expected when running in those version ranges. Not opposed to that comment in the docs, but as I said in the other thread, I think it might not yet be the best time to update the types.
Either way, there's no rush to make the change. This method is still a draft even though Node.js has implemented it, so it's also preferable to wait until it is no longer a draft and becomes part of the official HTTP specification