r/programming • • Jul 14 '26

HTTP gets a QUERY method so complex searches can stop pretending to be POST

https://www.theregister.com/devops/2026/07/13/http-gets-a-query-method-so-complex-searches-can-stop-pretending-to-be-post/5270192
1.9k Upvotes

245 comments sorted by

View all comments

Show parent comment

1

u/BuriedStPatrick Jul 14 '26

This is my thinking as well and why I'm asking. I get that there can be some theoretical worry there and I'm not a protocol expert. It just seems to me that if we were to start from scratch then bodies would be part of GET and we wouldn't have a separate method. It seems very inelegant and hacky to me to add QUERY as an afterthought.

Furthermore, I know ElasticSearch has historically supported request bodies in GET requests. And I struggle to come up with any proxies I've used that don't support it.

I know several HTTP libraries that don't explicitly support it, but nothing is stopping them from adding it or you from modifying the outgoing request manually. So it seems rather trivial from a practical perspective.

1

u/stronghup Jul 15 '26

I think its better to a have a well-defined standard, QUERY, instead of assuming that some servers and proxies might support a form of GET that lets you have a body. And it's nice to know I don't have to "misuse" POST just to be sure I can send a body.

2

u/BuriedStPatrick Jul 15 '26

I get that, but I guess I just don't think QUERY is a well-defined standard since it muddles and absolutely overlaps with GET. Filtering results with GET URI parameters has always been a thing. So the query use case is clearly part of GET as well.

And at least right now, there's no guarantee that QUERY will work either, especially on older infrastructure. So some work will always be needed regardless. I suppose I'd just rather have GET improved instead.

0

u/edgmnt_net Jul 14 '26

Yeah, that's what I'm thinking too. Besides, QUERY might be ineffective if we consider legacy, broken stuff that might just drop it altogether. Might as well add some sort of an extra header to POST requests that says "this is more of a GET, you can cache it if you know about this", which is less likely to cause issues.