HeadlinesBriefing favicon HeadlinesBriefing.com

Understanding the New HTTP QUERY Verb

Hacker News •
×

RFC 10008 introduced a new HTTP verb called QUERY, aimed at read‑only operations that need a request body. Developers have long abused GET query strings for filtering, but complex searches produce unwieldy URLs, hit length limits, and require cumbersome encoding. POST can carry a body, yet its non‑idempotent semantics break caching and retry logic, and complicates debugging in production environments.

Because GET bodies are discouraged and many intermediaries drop them, the community settled on POST despite its drawbacks. QUERY mirrors GET’s safety and idempotence while allowing a JSON payload, letting caches incorporate the body into the key. Early tool support is sparse; Kreya added native QUERY handling in version 1.20, but most proxies and servers still reject the method, and many CDN configurations reject it.

Adopting QUERY now means testing against limited infrastructure and accepting that bookmarks cannot encode body data. When simple parameter strings suffice, GET remains preferable. For APIs that require deep filtering, QUERY offers a standards‑based alternative to POST, preserving safe semantics and enabling proper caching once ecosystem support matures. Developers should also document the schema to avoid ambiguity in client implementations.