Open
Description
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
.
Activity
QUERY
method expressjs/express#5615wesleytodd commentedon May 22, 2025
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 @jonchurchCxRes commentedon May 23, 2025
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
bjohansebas commentedon May 23, 2025
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
RobinTail commentedon Jun 5, 2025
I also have a question about adding the method to the types declaration:
expressjs/express#5615 (comment)
wesleytodd commentedon Jun 5, 2025
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 forQUERY
undernode@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.bjohansebas commentedon Jun 6, 2025
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