QUERY: The HTTP method we have faked for 16 years
Backend developers face a constant problem with search endpoints.
You want to use GET because searching is a read operation. But your search filters grow too large. Your URL hits two thousand characters. Proxies truncate your request. Your search breaks.
You switch to POST to fix the limit. This works, but it is a lie. POST tells every proxy and cache that you are changing data. This stops all caching. You lose the speed of a GET.
For sixteen years, we had no middle ground.
In June 2026, the IETF published RFC 10008. This introduces the QUERY method. It is the first new HTTP method since 2010.
QUERY combines the best parts of GET and POST:
• It carries a request body for complex filters. • It is safe, meaning the server does not change state. • It is idempotent, meaning you can run it twice with the same result. • It is cacheable, allowing CDNs to store responses.
A QUERY request looks like this:
QUERY /products HTTP/1.1 Host: api.shop.example Content-Type: application/json
{ "filter": { "category": "boots", "inStock": true }, "sort": "-price", "limit": 20 }
The new RFC also adds the Accept-Query header. This lets an API tell you which query formats it supports.
A warning for developers:
Caching a QUERY request is different from a GET request. A GET cache uses the URL as the key. A QUERY cache must use the request body as part of the key. If your infrastructure does not understand this, one user might see another user's private search results.
Do not rush to use this in production yet. The ecosystem needs time to catch up.
• Browsers do not support QUERY in fetch() yet. • HTML forms only support GET and POST. • Many API gateways and WAFs will reject unknown methods.
Design your API with QUERY in mind, but keep your POST endpoints for now.
QUERY ends a long compromise. It lets you ask complex questions without lying to the network.
Are you waiting for the ecosystem to catch up, or are you testing QUERY now?
Source: https://dev.to/arya_koste_5845807df94776/query-the-http-method-weve-been-faking-for-16-years-f9i
