The Internet Engineering Task Force (IETF) has formally designated RFC 10008 as a proposed standard, introducing a long-awaited new HTTP method: QUERY. This addition addresses a fundamental gap in the HTTP specification, offering developers a safe, idempotent method that supports a request body.
What Is the HTTP QUERY Method?
The HTTP ecosystem has long relied on a handful of core methods. Each serves a distinct role in how clients and servers communicate.
GET is the traditional method for retrieving data. However, it encodes all parameters directly into the URL. This imposes strict length limitations across browsers, proxies, and web servers.
POST allows parameters to travel inside the request body, avoiding those length constraints. Yet it is semantically tied to creating or modifying resources. Repeating a POST after a network failure risks unintended side effects.
QUERY now bridges this gap elegantly. It combines the convenience of a request body with the safe, idempotent character of GET. Servers and intermediaries can freely repeat a QUERY request after a failure without risking partial state changes.
Why This Matters for API Design
Modern Web APIs frequently deal with complex search and filtering requirements. Long query strings like ?q=foo&limit=10&sort=-published quickly become unwieldy. Moreover, they expose parameters in server logs and browser histories.
The QUERY method offers a cleaner alternative. Clients can express rich, structured query parameters inside the request body. This approach sidesteps URL length restrictions that remain a practical concern across many infrastructure layers.
Additionally, request bodies are less likely to appear in standard proxy logs than URL parameters. That said, developers should still apply proper encryption and access controls for any sensitive data. QUERY does not replace transport-layer security.
Caching and Content Negotiation
One of the most compelling features of QUERY is its support for caching. Servers and proxies may cache QUERY responses, assign them a dedicated URI, and later serve the stored results via a conventional GET request.
Furthermore, servers can advertise QUERY support through the OPTIONS method. They may also specify accepted query formats using the Accept-Query response header. The specification explicitly permits several query formats, including standard form parameters, JSONPath, XSLT, and SQL.
Practical Use Cases
The QUERY method is particularly well-suited to several common scenarios.
Search forms can now send complex filter criteria without bloating the URL. Web APIs can accept structured query documents in the body while remaining semantically safe for clients to retry. Data filtering interfaces gain a standardized, cacheable mechanism that eliminates awkward POST-for-search workarounds.
What Comes Next?
The IETF’s proposed standard status signals that the specification is stable and ready for broad implementation. Browser vendors, proxy developers, and server framework maintainers will now be expected to evaluate and adopt support for QUERY.
In summary, RFC 10008 brings a meaningful and long-overdue refinement to HTTP. It aligns the protocol’s semantics more closely with the realities of modern API design, without compromising the safety guarantees that make HTTP reliable at scale.
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.