When an HTTP request is too long or complex to be encoded in its URI using GET, developers have long resorted to using the POST method as a workaround. However, this can create issues; while GET requests are defined as safe and idempotent, POST does not necessarily share those characteristics.

To combat the problem, the Internet Engineering Task Force (IETF) has published a proposed standard HTTP request method, QUERY (RFC 10008), which bridges the two functions, taking the best of each.

A safe method is defined as one which is “essentially” read-only, where “the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource. Likewise, reasonable use of a safe method is not expected to cause any harm, loss of property, or unusual burden on the origin server,” the IETF standards document states. And when a request is idempotent, no matter how many times it is retried, the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request.

POST requests do not always fulfill those criteria. But QUERY requests do. The input to the QUERY operation is, like POST, passed as the content of the request, rather than as part of the request URI as it is with GET. Unlike POST, QUERY allows functions such as caching and automatic retries to operate, precisely because it is safe and idempotent.