The QUERY method: how the new RFC 10008 changes the Web

The IETF has made QUERY official: an HTTP method with a request body and safe, idempotent semantics. What it means for anyone designing APIs.

  • web
  • api
  • http

The HTTP ecosystem has just taken one of its most important steps in years. The Internet Engineering Task Force (IETF) has officially published RFC 10008, which adds a new native method to the protocol: QUERY.

Written jointly by experts from Greenbytes, Cloudflare and Akamai (J. Reschke, J.M. Snell and M. Bishop), QUERY addresses a classic architectural dilemma that API and web developers have faced for decades: how to send complex queries safely, idempotently and without the physical limits of the URL.

The problem we were trying to solve

Until RFC 10008, developers who needed to run complex searches against databases or REST APIs had to pick between two imperfect options:

Abusing GET: passing every search parameter as a query string in the URL (e.g. /search?tag=tech&date=2026&sort=desc...).

  • The problem: URLs have practical size limits (usually somewhere between 2KB and 8KB depending on the browser or proxy). On top of that, sensitive data in the URL ends up in browser history and server logs.

Abusing POST: sending structured search parameters (such as JSON) in the request body.

  • The problem: by architectural definition, POST is neither safe nor idempotent. Browsers and proxies assume a POST may change server state (create or modify data). If the connection drops in the middle of a heavy query, the client cannot simply retry it automatically without risking unwanted side effects.

The solution: the QUERY method

QUERY sits right in the middle. It combines the best of both worlds: it allows a request body (like POST) while keeping strictly safe and idempotent semantics (like GET).

Here is a direct comparison with the traditional methods:

Property GET POST QUERY
Has a body? Not recommended/ignored Yes Yes
Safe? Yes No Yes
Idempotent? Yes No Yes
Can be retried on failure? Yes No Yes

A practical request

Where you once had to send a complex JSON search with POST, the official syntax under RFC 10008 looks like this:

QUERY /users HTTP/1.1
Host: api.example.com
Content-Type: application/json

{
  "filters": {
    "status": "active",
    "city": "São Paulo"
  },
  "order": "name_asc",
  "limit": 50
}

The server processes the body, validates the Content-Type (which becomes mandatory for QUERY to avoid ambiguity) and returns the result with a 2xx status.

Caching and URI assignment

One of the biggest technical discussions around RFC 10008 is caching. Since a QUERY carries a body of variable size, traditional caching keyed strictly on the URL becomes inefficient by default.

To work around this, the specification says the server may assign a temporary or persistent URI to the result of that specific query (through a response header). So if the client or a proxy wants to keep that result, it can issue a subsequent GET to the URI the server generated, saving traffic on heavy queries.

Adoption challenges

As great as this addition is, the move to QUERY won't happen overnight. The technical community points to these short-term infrastructure challenges:

  • Middleboxes and proxies: corporate firewalls, old proxies and legacy load balancers often drop or reject unknown HTTP methods, or apply overly strict rules when they see a body on something they consider "GET-like".
  • Browser and library support: popular tools are starting to adapt. Ecosystem tools such as curl have already begun experimental native support for QUERY. Wide use in browsers, however, still depends on updates to engines like Chromium and Gecko.
  • CORS (Cross-Origin Resource Sharing): being a new method, QUERY requires preflight requests (the well-known OPTIONS method) in cross-origin scenarios, since it is not yet on CORS's list of default safe methods.

RFC 10008 settles an API design debate that had been going on for more than a decade. By making QUERY official, the IETF gives software engineers the right tool for complex, data-heavy read operations (full-text search, BI filters, reports and GraphQL/JSON payloads).

From now on, the web gets more robustness, more safety and much cleaner semantics for handling data in the age of modern applications.

Originally published on Medium.