For 25 years, web developers have gotten by with a familiar handful of HTTP methods: GET, POST, PUT, DELETE, PATCH. In June 2026, the list officially grew. Meet QUERY — standardized as RFC 10008 by the IETF, with authors from Cloudflare, Akamai, and greenbytes. It’s the first genuinely new, general-purpose HTTP method in a very long time, and it fixes a problem developers have hacked around for years.
The problem QUERY solves
Say you’re building a search or filter endpoint. You have two bad options:
- Use GET and cram everything into the URL query string. This is “correct” (search is safe and repeatable), but URLs have length limits, complex/structured queries are painful to encode, and your search terms end up in server logs, browser history, and proxy caches.
- Use POST and put the query in the request body. Now you have room for a rich query — but you’ve lied about your intent. POST is neither safe (it’s allowed to change server state) nor idempotent (repeating it might do something twice). So the response can’t be cached, and clients, proxies, and browsers won’t safely retry it.
People also tried “GET with a body,” but that’s undefined behavior — many servers and proxies simply ignore or reject the body. There was no right answer. Until now.
What QUERY actually is
Straight from the spec: a QUERY request asks the server to process the enclosed content in a safe and idempotent manner and respond with the result. In plain terms:
- It has a request body, like POST — so you can send a big, structured query (JSON, SQL, GraphQL, whatever the server accepts).
- It’s safe, like GET — it doesn’t change server state.
- It’s idempotent, like GET — it can be automatically retried or restarted without fear of doing something twice.
That combination is exactly the sweet spot that didn’t exist before:
What it looks like
A QUERY request is refreshingly readable — the method up top, the query in the body:
QUERY /contacts HTTP/1.1
Host: example.com
Content-Type: application/json
Accept: application/json
{ "filter": { "age": { "gt": 30 } }, "fields": ["name", "email"] }
The server processes the body and returns the result — and because the request is safe and idempotent, that response can be cached and the request can be safely repeated.
The extras that make it practical
- Accept-Query header. A server can advertise which query formats it understands (via an
OPTIONSresponse), so clients can discover whether to send JSON, SQL, GraphQL, etc. - Cacheable responses. QUERY plays with HTTP caching and the
Content-Locationheader, so a query result can point at a cacheable representation. - Conditional requests. It works with
ETag/If-None-Match, so repeat queries can return a cheap “not modified.”
Why it matters
Search APIs, analytics endpoints, GraphQL-over-HTTP, database front-ends, and any “complex read” finally have a method that describes what they actually do. That means better caching, safe retries, cleaner logs (no secrets in the URL), and honest semantics for the intermediaries — proxies, CDNs, gateways — that make the web fast.
The catch: adoption takes time
A standard is step one. Now servers, frameworks, proxies, CDNs, and client libraries have to add support, and old intermediaries that don’t recognize QUERY may mishandle it for a while. Expect a gradual rollout — the big infrastructure players (note the authors’ employers) are already on board, which is the fastest path to real-world support. If you’re building an API today, it’s worth watching your stack for QUERY support and planning for it.
The takeaway
QUERY isn’t flashy, but it’s the kind of quiet plumbing upgrade that makes the whole web a little more correct. After years of misusing GET and POST for search, developers finally have the method they always needed: a request with a body that’s safe, idempotent, and cacheable. Welcome to the club, QUERY.
Reference: RFC 10008, “The HTTP QUERY Method” (IETF, June 2026).
Comments
Post a Comment