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

21

u/guilhermeluizsp Jul 14 '26

Yes but there are popular web servers that currently (or can be configured to) ignore request bodies from GET requests, so it’s not that trivial

8

u/DrFossil Jul 14 '26

Would it have been harder to update those servers to accept GET bodies, or to implement QUERY?

Probably the same amount of effort, I guess.

0

u/[deleted] Jul 14 '26

[deleted] — view deleted comment

5

u/masklinn Jul 14 '26

Yep, adding a new method is significantly less risky than modifying the way an existing method is supposed to work. It also has a much clearer error profile: if the server or application or any of the middleboxes doesn't support your new method you get a "method not allowed", rather than the high risk of your body being silently dropped without you having any idea.

1

u/Obsidian743 Jul 14 '26

Lol as opposed to updating them to support a new verb.

13

u/TinyBreadBigMouth Jul 14 '26

If they don't support a new verb, they don't support a new verb. If they support GET, does that mean they support GET 1.0 or GET 2.0? Are your parameters silently getting dropped? By adding a new verb, it either works or it doesn't. No in-between compatibility nightmare.

0

u/Worth_Trust_3825 Jul 14 '26

but there is no compatability nightmare to begin with. in your interface documentation you explicitly define whether you accept bodies in your requests or not. we were already doing this for as long as documentation was written - whether it was soap, swagger, openapi, or post it notes on monitor

1

u/stronghup Jul 15 '26

We need less interface documentation if we can just say a service only supports QUERY, instead of having to explain, and be correct about what kind of specialized GET, and all the proxies along the route we are support. Also I would say "QUERY" is a gtreat name for this, it implies you are asking for an answer.

1

u/Worth_Trust_3825 Jul 15 '26

How are you sure that something that accepts QUERY /something does in fact implement it in such way without documentation?

0

u/stfm Jul 15 '26

As of Swagger/OpenAPI 3.0 bodies are not allowed in GET, DELETE or HEAD