upvote
It was funny a few years ago, when I had to grade students answering a quiz about web services. There was a question about which components were necessary for a valid GET request. The required answer was a list of 4-5 components, such as the "GET" verb, the URI, the HTTP version, etc.

And it was rather controversial that some listed a body as necessary for a GET request, and doing my research I came to find out that a "request body" was often quite undesirable and perhaps contrary to the RFC standards, and sending a "body" in a GET could result in undefined or unpredictable behavior. But it's all in good fun.

reply
You would be surprised how many technologies expect GET with a body. In practical backend engineering, tools like Elasticsearch, GraphQL, complex query engines, and legacy internal APIs rely on GET with a body every day. Apparently even axios messes up on curl GET requests with a body as mentioned in the associated github issue.

Perhaps the broken thing might be how you expect existing softwares to break so that your expectation can be satisfied. You should look at GET more closely.

There is a reason curl allows to send GET requests with a body. There is a reason node allows to receive GET requests with a body.

reply
A request body in a GET is not standard HTTP. Refusing to handle non-standard requests might be inconvenient, but it's an eminently defensible choice.

I understand why you'd want it, and that's why RFC10008 introduces QUERY as a GET-with-body alternative.

reply
Technically every http method can have a body? But the specification says the semantics are undefined on get and any compliant implementation is free to ignore it.
reply
Or any compliant implementation is free to not ignore it like istio/envoy, infrastructure tooling, etc.

What is the use of spec adherence if it leads to unusable/broken applications.

reply
QUERY, added in 2026, does not resolve existing or legacy applications.

Sticking to RFC is one thing. Advertising as node compatible is completely different altogether. Many people cannot see the difference.

Atleast a flag would suffice as that would ensure existing infrastructure tooling doesn't break while keeping the RFC spec folks happy.

reply
I can't speak for any of these other technologies, but no part of the GraphQL spec requires GET requests to have bodies. The spec is clear about how to use query strings instead.

https://github.com/graphql/graphql-over-http/blob/main/spec/...

reply
As I have noted elsewhere here in this thread, spec saying one thing has nothing to do with how many libraries implement something. If the libraries are critical and provide value, then no matter how much you scream for your adherence to the spec, people will use it and depend on it.

The QUERY method is a step in the right direction but it came too late.

reply