http icon indicating copy to clipboard operation
http copied to clipboard

Please add support for the `QUERY` HTTP method

Open gdubicki opened this issue 11 months ago • 1 comments

On 2025-01-07 the QUERY HTTP method, "a safe, idempotent request method that can carry request content." has reached ~the level of a Proposed Standard~ consensus and is on track to become a Proposed Standard.

It solves the problem of making complex queries where the GET method is sometimes sufficient as it (according to the standard) lacks support for sending the query in the body, leaving only the query part of the URL which is limited. An often used workaround of using the POST method has a downside in that it's just the wrong method for this purpose as queries do not cause side-effects and this limits the retryabilty and cacheability of such queries.

Therefore It would be great to implement support for QUERY in this library.

For example node.js has already implemented it and released in June 2024: https://github.com/nodejs/node/issues/51562

If you are open to it, I am interested in providing a PR.

(Related: https://github.com/tokio-rs/axum/issues/1691)

gdubicki avatar Jan 11 '25 09:01 gdubicki

There already was a PR for it here too: https://github.com/hyperium/http/pull/717

gdubicki avatar Jan 12 '25 14:01 gdubicki