Skip to content
Tech News
← Back to articles

The new HTTP QUERY method explained

read original more articles
Why This Matters

The introduction of the new HTTP QUERY method, as defined in RFC 10008, addresses limitations of traditional HTTP methods like GET and POST, especially for complex and nested queries. This development is significant for the tech industry as it enables more efficient, readable, and secure data retrieval, particularly for advanced filtering and relational data operations, enhancing both developer experience and application performance.

Key Takeaways

In the world of RESTful APIs, we have long lived by a strict set of (self-imposed) rules. Whether you are fetching data with GET, creating an entity with POST, or updating a resource with PUT, the HTTP method tells the server what your intention is.

Quite recently, RFC 10008 got published, which defines the new QUERY method for HTTP. Why is this needed when we already have other HTTP methods? Let's find out.

From a purely technical point of view, the HTTP method is just a string. Instead of sending

GET /api/v1/users

you could also use

FETCH /api/v1/users

in theory. In practice, there are lots of RFCs and implicit, undocumented behaviour around the well-known HTTP methods, such as GET and POST.

As an example, browsers send a GET request when you enter an address or click on a bookmark. Standard HTTP forms only allow GET and POST as methods. Most proxies, firewalls and webservers only allow the "standard" HTTP methods.

... continue reading