Hacker News new | ask | show | jobs
by nokeya 7 hours ago
If it needs so much explanation and discussion, maybe it is not a great idea after all?
4 comments

The article describes the current situation first. The whole explanation is quite simple: QUERY requests are the same as GET, but they have a body.
So just add an optional body to get
The article also addresses why this is not the chosen solution. It's pretty much the first one you'd think of: all kinds of existing software (that can be between client and server and out of their control) already handle GET bodies in all kinds of incompatible ways, because the existing standard says they're meaningless and "shouldn't" be included. The idea is to not break people's stuff, so they don't rugpull the established standard.

There's usually a reason why the simplest solution that pops into one's head is not "just" used by the people who put a lot more thought into it. Not always, but it can be useful to try to come up with it.

So, I need to update all the tools to support QUERY, or I need to update all the tools to support GET/body.

So, either way, I need to update all the tools.

Just fix GET.

The point is that if you do that, you end up with lots of undefined behaviour in existing software that has not been patched yet.

If you make it a whole new request method, existing unpatched software should just respond with "Method not allowed".

Which means you have to structure everything around multiple scenarios anyway.
Arguably the only explanation you need is that "QUERY is the same as GET plus a body". The article just explains what GET is and isn't, but that can be implied.
I don't think this requires so much discussion; it is a very obvious and simple addition, IMO.
It doesn't really need that much explanation though. TL;DR: It's GET but with bodies officially supported.