Skip to content
Tech News
← Back to articles

RFC 10008: The new HTTP Query Method

read original more articles
Why This Matters

RFC 10008 introduces the HTTP QUERY method, a new request type that combines the safety and idempotency of GET with the ability to handle larger, more complex query data typically sent via POST. This development enhances the efficiency, security, and clarity of web communications, especially for data-intensive applications, benefiting both developers and end-users by enabling more reliable and scalable interactions.

Key Takeaways

This specification defines the HTTP QUERY request method as a means of making a safe, idempotent request ( Section 9.2 of [ HTTP ]) that encloses a representation describing how the request is to be processed by the target resource. ¶

A common query pattern is: ¶

However, when the data conveyed is too voluminous to be encoded in the request's URI, this pattern becomes problematic: ¶

size limits often are not known ahead of time because a request can pass through many uncoordinated systems (but note that Section 4.1 of [ HTTP ¶

¶ expressing certain kinds of data in the target URI is inefficient because of the overhead of encoding that data into a valid URI, ¶

request URIs are more likely to be logged than request content and may also turn up in bookmarks, ¶

encoding queries directly into the request URI effectively casts every possible combination of query inputs as distinct resources. ¶

As an alternative to using GET, many implementations make use of the HTTP POST method to perform queries, as illustrated in the example below. In this case, the input to the query operation is passed as the request content as opposed to using the request URI's query component. ¶

A typical use of HTTP POST for requesting a query is: ¶

In this variation, however, it is not readily apparent -- without specific knowledge of the resource and server to which the request is being sent -- that a safe, idempotent query is being performed. ¶

... continue reading