HTTP Gets Its First New Method in 16 Years: QUERY
If you've developed REST APIs, you're definitely familiar with HTTP methods like GET, POST, PUT, and DELETE.
But did you know? In June 2026, the IETF officially published RFC 10008, adding a brand new request method to the HTTP standard — QUERY.
This is the first new HTTP request method since PATCH (RFC 5789) in 2010. In other words, the HTTP request method set has gone 16 years without a new standard member.
RFC 10008 (The HTTP QUERY Method)
The emergence of QUERY primarily solves a problem developers have been working around for years: how to elegantly send complex query requests.
It should be noted that RFC 10008 defines a new HTTP request method, not a new REST specification. Its goal is to provide standard support for query operations requiring complex request bodies while maintaining HTTP's "Safe" and "Idempotent" semantics.
Why is GET no longer enough?
According to REST design principles, querying resources should typically use GET.
For example, an interface to query orders:
GET /orders?select=surname,givenname,email&limit=10&match="email=*@example.*"
Initially, this approach worked perfectly.
But as business logic grew more complex, problems gradually emerged.
For example:
- URL length has limits (many servers cap it around 8 KB)
- Query parameters easily appear in browser history, logs, or proxy records, making them unsuitable for carrying sensitive information
- It's difficult to express complex queries, such as SQL, JSONPath, DSL, or multi-layered filtering conditions
- URL parameter encoding is cumbersome, with poor readability and maintainability
As a result, more and more developers started looking for alternatives.
Why did everyone switch to POST?
In reality, a large number of query interfaces are actually implemented like this:
POST /orders
Content-Type: application/json
{
"select": ["surname", "givenname", "email"],
"limit": 10,
"match": "email=*@example.*"
}
Because the request body has almost no length limit and is better suited for organizing complex data.
But this brought new problems.
Although this POST request is actually just querying data and doesn't modify server state, the HTTP protocol itself has no way of knowing this.
Therefore:
- It cannot utilize
GET's standard caching mechanisms - Browsers, CDNs, and proxy servers cannot determine if the request is cacheable
- During network anomalies, clients usually dare not auto-retry
- Various frameworks can only implement their own so-called "safe POST" without a unified standard
QUERY exists to solve this problem
The new HTTP QUERY method allows developers to:
- Send complex queries using a request body
- Simultaneously tell HTTP explicitly: This is a read-only query that will not modify server state.
For example:
QUERY /orders
Content-Type: application/json
{
"select": ["surname", "givenname", "email"],
"limit": 10,
"match": "email=*@example.*"
}
This retains the flexibility of POST while possessing the semantics of GET.
What are the advantages of QUERY?
1. Not limited by URL length
All complex queries can be placed in the request body, for example:
- SQL
- GraphQL queries
- JSONPath
- Elasticsearch DSL
- Multi-condition filtering
None of these need to be concatenated into the URL anymore.
2. It is a Safe request
RFC 10008 explicitly states:
QUERYis a Safe Method.
That is, it can only read resources and is not allowed to modify server state.
This is completely consistent with GET.
3. Supports Idempotency
This is also a point where many articles are prone to misinterpretation.
Idempotent does not equal Cacheable.
HTTP's definition of idempotency is:
Multiple identical requests have the same effect on the server's final state as a single request.
For example:
PUT /users/1
Executing it ten times, the data on the server ultimately remains consistent, so PUT is idempotent.
Another example:
DELETE /users/1
The first deletion succeeds, and subsequent deletions do not further change the server state, so DELETE is also idempotent.
Whereas:
POST /users
Each send creates a new user, so POST is not idempotent.
Similarly, QUERY is also idempotent.
Because no matter how many times it is sent, it only executes a query and does not change server state.
Idempotent ≠ Cacheable
These are the two most easily confused concepts in HTTP.
Idempotency describes:
Whether repeating a request has a consistent effect on server state.
Cacheability describes:
Whether the response allows caching by browsers, proxy servers, or CDNs for direct reuse later.
There is no necessary connection between the two.
For example:
| HTTP Method | Idempotent | Cacheable by Default |
|---|---|---|
| GET | ✅ | ✅ |
| QUERY | ✅ | ✅ (Cache support defined by RFC 10008) |
| PUT | ✅ | ❌ |
| DELETE | ✅ | ❌ |
| POST | ❌ | Generally not cached |
Therefore, do not interpret "idempotent" as "cacheable."
It's just that GET and QUERY possess both characteristics simultaneously, which easily leads people to mistakenly think there is a causal relationship.
Why does QUERY support caching?
Because QUERY explicitly tells HTTP:
This is a query request that will not modify data.
Therefore:
- Browsers can cache it
- CDNs can cache it
- HTTP proxies can cache it
This means complex queries can finally enjoy standard HTTP caching mechanisms without continuing to rely on various "POST query" workarounds.
An interesting new capability: The query itself can have a URI
Traditional POST focuses more on returning query results:
POST /orders
Content-Location: /results/123
Whereas QUERY can return a URI representing the query itself:
QUERY /orders
Location: /saved-queries/42
Accessing it again later:
GET /saved-queries/42
The server will re-execute the originally saved query and return the latest data.
This means you can:
- Bookmark a query
- Share a query link with colleagues
- Schedule periodic re-execution of a query
- Cache the query, not just the result
API design will also become simpler
In the past, we might have designed multiple interfaces:
GET /users/active
GET /users/inactive
GET /users/premium
With QUERY, these can be unified into:
QUERY /users
Different query conditions are all placed into the request body.
This not only reduces the number of interfaces but also makes them easier to maintain, extend, and monitor.
Summary
QUERY is not meant to replace GET or POST.
It's more like filling in a long-missing puzzle piece between the two:
- Like
GET, it is only responsible for querying and does not modify data (Safe). - Like
GET, it possesses idempotency, allowing safe retries. - Like
GET, it supports standard HTTP caching mechanisms. - Like
POST, it supports a request body, is not limited by URL length, and is suitable for complex queries.
It needs special emphasis that Idempotency and Cacheability are two independent concepts. Although PUT and DELETE are also idempotent methods, they are not cacheable by default; QUERY possesses both idempotent and cacheable characteristics, which is explicitly defined by the RFC.
Currently, QUERY officially became the RFC 10008 standard in June 2026. However, because servers, clients, and various web frameworks are still gradually catching up, implementation support will take some time, with widespread adoption expected around 2027–2028.
Before using it in production environments, it's recommended to first monitor the support status of QUERY across major HTTP Servers, API Gateways, browsers, and frameworks. But for API designers, understanding its design philosophy and applicable scenarios now will help build more standardized and extensible REST APIs.
References
- RFC 10008 – The HTTP QUERY Method (Official) https://www.rfc-editor.org/info/rfc10008
- RFC 10008 HTML Version https://www.rfc-editor.org/rfc/rfc10008.html
Top 1 from juejin.cn, machine-translated. The original thread is authoritative.
浏览器的支持情况呢?