7 July 2026

HTTP QUERY: The new method between GET and POST that could change the way we design APIs and caches

HTTP QUERY introduces a new balance between GET and POST, improving the handling of complex queries in modern APIs and web infrastructures and giving a nod to web caches and CDNs.

HTTP-QUERY-METHOD

In the HTTP world, we have been accustomed for decades to reasoning around a few fundamental methods. GET to recover a resource, POST to send data to the server, PUT to update, DELETE to eliminate. This seemingly simple grammar underpins a huge part of the modern web: websites, REST APIs, mobile apps, SaaS services, microservices, reverse proxies, CDNs, and caching systems.

As applications have evolved, however, an increasingly evident grey area has emerged: how to properly manage the complex read-only queriesConsider a search with many filters, a GraphQL request, a reporting endpoint, a query with pagination, sorting, time ranges, and nested conditions. Semantically, the operation is a read: the server must return data, not modify it. So it would be natural to use GET. But from a practical standpoint, GET forces you to put everything in the URL, which presents length limitations, encoding issues, poor readability, and potential privacy implications for logs.

For years, the most common solution has been to use POST even for operations that were, in reality, simple queries. POST allows you to send a structured body, such as JSON, but it communicates a different meaning to the protocol: a request that could Modify the server's state. This detail isn't just theoretical. For caches, proxies, CDNs, WAFs, and HTTP clients, the method used is crucial information. Using POST to read data often means giving up some of the optimizations that HTTP already provides.

The new method HTTP QUERY, standardized with RFC 10008, was created precisely to fill this gap: it allows you to send a request with a body, like POST, but retains the properties of a read-only request, like GET. In other words, QUERY tells the server and intermediaries: "I'm executing a query, I can have a body, but I'm not asking to change the state of the resource."

The historical problem: GET is correct, but often insufficient

GET is the most natural HTTP method when we want to retrieve information. sure, because the client does not ask the server to change the state of the resource, and it is idempotent, because repeating the same request multiple times shouldn't produce different side effects. Furthermore, GET responses are easily handled by caches, browsers, reverse proxies, and CDNs.

The problem arises when the query becomes too complex. A request like this is perfectly manageable:

GET /prodotti?categoria=hosting&limit=10&sort=prezzo HTTP/1.1
Host: example.com

But what happens when you have dozens of filters, perhaps with nested conditions, arrays, dates, logical operators, full-text search, sorting preferences, and aggregation parameters? The URL becomes long, difficult to read, and more fragile throughout the delivery chain. Browsers, client libraries, enterprise proxies, load balancers, CDNs, and application firewalls can have different limitations and behaviors.

Then there is a topic that is often underestimated: URLs are logged very easilyThey end up in web server logs, reverse proxy logs, browser history, analytics tools, monitoring systems, or debugging dashboards. If the query contains sensitive data, even indirectly, including it in the query string isn't always the most prudent option.

Why POST has never been an elegant solution

POST solves the practical problem of the body. We can send complex JSON, a GraphQL query, an XML payload, or a custom application format without having to compress everything into the URL. For this reason, many modern APIs have used POST even for read-only operations.

The point is that POST doesn't convey the same semantics to the protocol as GET. A POST can create a resource, update a state, start a process, record an order, send a message, and produce permanent effects. When we use it simply to query data, the server knows this, the application client may know it, but HTTP intermediaries can't generally deduce it.

This means that Caching, automatic retry, proxy optimizations, and CDN strategies They become more complicated. An intermediate system can't assume that repeating a POST is harmless. It can't treat it with the same ease as a GET. As a result, many APIs that perform heavy reads end up always burdening the backend, even when the response would technically be reusable.

What does HTTP QUERY introduce?

QUERY introduces a simple but very powerful concept: a request can have a body, but remain read-only. The structure is similar to POST, but the semantics are different.

QUERY /api/search HTTP/1.1
Host: example.com
Content-Type: application/json
Accept: application/json

{
"q": "hosting linux managed",
"limit": 20,
"sort": "-created_at",
"filters": {
"status": "active",
"type": ["article", "service"]
}
}

With QUERY, the content of the request describes how to query the target resourceThe server processes the query and returns the result, without the client requesting a change in the resource's state. The RFC defines QUERY as a secure and idempotent method: two crucial properties for those designing reliable, scalable APIs that integrate well with the HTTP infrastructure.

However, QUERY should not be confused with a new data format. QUERY does not impose JSON, SQL, GraphQL, or JSONPath. The format is declared via Content-TypeThis makes the method flexible: each application can choose the most suitable query language, as long as the client and server agree on the meaning of the payload.

GET, POST, and QUERY Compared

Property GET POST QUERY
Sure Yes Not necessarily Yes
Idempotent Yes Not necessarily Yes
Body in the request No general semantics defined Yes Yes
Suitable for complex queries Only within certain practical limits Yes, but with ambiguous semantics Yes, with correct semantics
Cacheable Yes With strong practical limitations Yes

The main difference is precisely this: QUERY combines the body of POST with the semantics of GETIt may seem like a subtle detail, but for those working on high-traffic APIs, microservices architectures, or distributed infrastructures, it can make a big difference.

GET VS POST HTTP

The role of the Accept-Query header

The RFC also introduces the header Accept-Query, designed to allow a resource to declare which query formats it supports. This is a useful discovery mechanism because it saves the client from having to guess.

HTTP/1.1 200 OK
Allow: GET, QUERY
Accept-Query: application/json, application/graphql

In this example, the server declares that the resource accepts QUERY requests with JSON or GraphQL payloads. For a well-designed client, this information is invaluable: it allows it to choose the correct format, handle fallbacks, and produce clearer errors when the format is not supported.

The presence of Accept-Query is also interesting from an infrastructure perspective. In an environment consisting of API gateways, reverse proxies, and backend services, being able to explicitly declare support for query formats helps design cleaner contracts between the various components.

Cache and reverse proxy: where QUERY gets really interesting

The practical value of QUERY comes into its own when we talk about caching. A GET request is normally identified by its URI. With QUERY, however, a cache must also consider the content of the request and relevant metadata, such as Content-Type and other headers that influence the result.

This allows for multiple cacheable responses on the same endpoint, distinguishing them based on the query body. Two identical QUERY requests can be served from the cache; two different QUERY requests to the same endpoint must produce different cache keys.

For a modern infrastructure, this opens up interesting scenarios:

  • application load reduction on research or reporting endpoints;
  • better exploitation of reverse proxies and CDNs in front of read-only APIs;
  • safer retries in case of temporary network errors;
  • clearer semantics between client, gateway and backend.

Of course, simply having a standardized method isn't enough for everything to work immediately. Every element in the chain must recognize it, or at least forward it correctly: web servers, proxies, load balancers, CDNs, WAFs, application frameworks, and client libraries.

Beware of adoption: standardization does not mean immediate support

An important aspect is to distinguish between standardization e royal adoptionJust because QUERY has been defined as an RFC and registered by IANA doesn't mean that every browser, framework, CDN, or firewall already handles it optimally.

In real-world infrastructures, there are often explicit rules about permitted HTTP methods. A WAF might only allow GET, POST, HEAD, OPTIONS, PUT, and DELETE. A reverse proxy might have restrictive configurations. A legacy application might respond with an error to an unknown method. A logging system might not correctly classify the new request.

For this reason, QUERY should be considered a technology that should be carefully evaluated, especially in controlled contexts: server-to-server communications, internal APIs, test environments, microservices under the same operating domain, high-traffic search endpoints where clients and servers are managed by the same organization.

What this means for those managing hosting, Linux servers, and production APIs

From a systems perspective, QUERY isn't just a new feature for developers. It's a change that also affects those managing the infrastructure. If an application starts using QUERY, it's important to ensure that the entire chain is ready to receive and correctly forward the new method.

In a Linux environment with web servers, reverse proxies, and application firewalls, the main checks involve at least these aspects: Nginx or Apache configurations, WAF rules, CORS policies, logging, metrics, APM systems, load balancers, CDNs, and security tools. An unknown or not explicitly permitted HTTP method can be blocked before it even reaches the application.

It's also important to think about caching. If a reverse proxy or CDN starts caching QUERY responses, the cache key must include the request content and the correct metadata. Incorrect normalization could return incorrect results. Conversely, an overly conservative configuration could negate the benefits of the new method.

In other words, QUERY can be very useful, but it must be part of a thoughtful infrastructure design. It's not a simple "verb change" on the code side: it requires testing, observability, and consistent rules across the entire platform.

A practical example with curl

A client might send a QUERY request like this:

curl -X QUERY "https://api.example.com/search" 
-H "Content-Type: application/json" 
-H "Accept: application/json" 
--data '{
"q": "server managed linux",
"limit": 10,
"sort": "-published_at"
}'

From an application perspective, the server receives a structured payload. Semantically, however, the request isn't a generic POST: it's a secure and idempotent query. This is the core of the standard.

Will QUERY replace GET or POST?

No. QUERY wasn't created to replace GET or POST, but to address a use case that until now has been handled with compromises. GET remains perfect for simple requests, resources directly identifiable by URL, and easily cacheable content. POST remains the correct method when the client sends data that can create, modify, or trigger processing that impacts the server.

QUERY fits in between the two: it is suitable when we need to perform a complex query, with body, but read-onlyIt is therefore particularly interesting for search APIs, GraphQL, analytics endpoints, reporting, aggregations, and internal services that query large amounts of data without modifying it.

Conclusion

HTTP QUERY is an important new feature because it corrects a practical flaw that developers know well: using GET when the query doesn't fit comfortably within the URL, or using POST when it loses semantic clarity and infrastructure benefits. With QUERY, HTTP finally offers a method designed for complex, secure, idempotent, and cacheable queries.

For API developers, this means being able to design more consistent endpoints. For those managing Linux infrastructures, reverse proxies, CDNs, and managed environments, this means preparing to support a new HTTP method with appropriate configurations, tests, and policies.

As is often the case with standards, the impact won't be immediate. Adoption will require time, updates, and compatibility throughout the chain. But the direction is clear: QUERY makes HTTP more expressive, more correct, and more suitable for modern APIs.

At Managed Server, we closely monitor these developments because they directly impact the performance, security, caching, and reliability of web applications. A well-managed infrastructure doesn't just run a website or API: it must also be ready to securely and confidently adopt the standards that improve the web.

Do you have doubts? Don't know where to start? Contact us!

We have all the answers to your questions to help you make the right choice.

Chat with us

Chat directly with our presales support.

0256569681

Contact us by phone during office hours 9:30 - 19:30

Contact us online

Open a request directly in the contact area.

DISCLAIMER, Legal Notes and Copyright. RedHat, Inc. holds the rights to Red Hat®, RHEL®, RedHat Linux®, and CentOS®; AlmaLinux™ is a trademark of the AlmaLinux OS Foundation; Rocky Linux® is a registered trademark of the Rocky Linux Foundation; SUSE® is a registered trademark of SUSE LLC; Canonical Ltd. holds the rights to Ubuntu®; Software in the Public Interest, Inc. holds the rights to Debian®; Linus Torvalds holds the rights to Linux®; FreeBSD® is a registered trademark of The FreeBSD Foundation; NetBSD® is a registered trademark of The NetBSD Foundation; OpenBSD® is a registered trademark of Theo de Raadt; Oracle Corporation holds the rights to Oracle®, MySQL®, MyRocks®, VirtualBox®, and ZFS®; Percona® is a registered trademark of Percona LLC; MariaDB® is a registered trademark of MariaDB Corporation Ab; PostgreSQL® is a registered trademark of PostgreSQL Global Development Group; SQLite® is a registered trademark of Hipp, Wyrick & Company, Inc.; KeyDB® is a registered trademark of EQ Alpha Technology Ltd.; Typesense® is a registered trademark of Typesense Inc.; REDIS® is a registered trademark of Redis Labs Ltd; F5 Networks, Inc. owns the rights to NGINX® and NGINX Plus®; Varnish® is a registered trademark of Varnish Software AB; HAProxy® is a registered trademark of HAProxy Technologies LLC; Traefik® is a registered trademark of Traefik Labs; Envoy® is a registered trademark of CNCF; Adobe Inc. owns the rights to Magento®; PrestaShop® is a registered trademark of PrestaShop SA; OpenCart® is a registered trademark of OpenCart Limited; Automattic Inc. holds the rights to WordPress®, WooCommerce®, and JetPack®; Open Source Matters, Inc. owns the rights to Joomla®; Dries Buytaert owns the rights to Drupal®; Shopify® is a registered trademark of Shopify Inc.; BigCommerce® is a registered trademark of BigCommerce Pty. Ltd.; TYPO3® is a registered trademark of the TYPO3 Association; Ghost® is a registered trademark of the Ghost Foundation; Amazon Web Services, Inc. owns the rights to AWS® and Amazon SES®; Google LLC owns the rights to Google Cloud™, Chrome™, and Google Kubernetes Engine™; Alibaba Cloud® is a registered trademark of Alibaba Group Holding Limited; DigitalOcean® is a registered trademark of DigitalOcean, LLC; Linode® is a registered trademark of Linode, LLC; Vultr® is a registered trademark of The Constant Company, LLC; Akamai® is a registered trademark of Akamai Technologies, Inc.; Fastly® is a registered trademark of Fastly, Inc.; Let's Encrypt® is a registered trademark of the Internet Security Research Group; Microsoft Corporation owns the rights to Microsoft®, Azure®, Windows®, Office®, and Internet Explorer®; Mozilla Foundation owns the rights to Firefox®; Apache® is a registered trademark of The Apache Software Foundation; Apache Tomcat® is a registered trademark of The Apache Software Foundation; PHP® is a registered trademark of the PHP Group; Docker® is a registered trademark of Docker, Inc.; Kubernetes® is a registered trademark of The Linux Foundation; OpenShift® is a registered trademark of Red Hat, Inc.; Podman® is a registered trademark of Red Hat, Inc.; Proxmox® is a registered trademark of Proxmox Server Solutions GmbH; VMware® is a registered trademark of Broadcom Inc.; CloudFlare® is a registered trademark of Cloudflare, Inc.; NETSCOUT® is a registered trademark of NETSCOUT Systems Inc.; ElasticSearch®, LogStash®, and Kibana® are registered trademarks of Elastic NV; Grafana® is a registered trademark of Grafana Labs; Prometheus® is a registered trademark of The Linux Foundation; Zabbix® is a registered trademark of Zabbix LLC; Datadog® is a registered trademark of Datadog, Inc.; Ceph® is a registered trademark of Red Hat, Inc.; MinIO® is a registered trademark of MinIO, Inc.; Mailgun® is a registered trademark of Mailgun Technologies, Inc.; SendGrid® is a registered trademark of Twilio Inc.; Postmark® is a registered trademark of ActiveCampaign, LLC; cPanel®, LLC owns the rights to cPanel®; Plesk® is a registered trademark of Plesk International GmbH; Hetzner® is a registered trademark of Hetzner Online GmbH; OVHcloud® is a registered trademark of OVH Groupe SAS; Terraform® is a registered trademark of HashiCorp, Inc.; Ansible® is a registered trademark of Red Hat, Inc.; cURL® is a registered trademark of Daniel Stenberg; Facebook®, Inc. owns the rights to Facebook®, Messenger® and Instagram®. This site is not affiliated with, sponsored by, or otherwise associated with any of the above-mentioned entities and does not represent any of these entities in any way. All rights to the brands and product names mentioned are the property of their respective copyright holders. All other trademarks mentioned are the property of their respective registrants. MANAGED SERVER® is a European registered trademark of MANAGED SERVER SRL, with registered office in Via Flavio Gioia, 6, 62012 Civitanova Marche (MC), Italy and operational headquarters in Via Enzo Ferrari, 9, 62012 Civitanova Marche (MC), Italy.

JUST A MOMENT !

Have you ever wondered if your hosting sucks?

Find out now if your hosting provider is hurting you with a slow website worthy of 1990! Instant results.

Close the CTA
Back to top