News for hackers. Stuff that matters.
Re:Request bodies in GET requests by nrmitchi on Monday January 31, 2022 @02:54PM (#30153322)
You often want to cache results of complex queries.

If these are POST, you find yourself trying to conditionally cache POST requests, which opens up a whole new class of caching bugs.

Re:Request bodies in GET requests by NavinF on Monday January 31, 2022 @03:05PM (#30153506)
If the queries are that long (over 2k-ish bytes), wouldn’t you wanna write a query file with POST and then execute it by name with a GET?
Re:Request bodies in GET requests by wtetzner on Monday January 31, 2022 @03:23PM (#30153731)
Then you need to build infrastructure for storing queries. Depending in the specifics of the project, that may or may not be OK.
Re:Request bodies in GET requests by cryptonector on Monday January 31, 2022 @03:50PM (#30154136)
That takes two steps, needs authorization, and needs queries created that way to be stable so that when you execute them with GET you know what you're executing.

This is a lot of application logic to add just to avoid adding a QUERY method. It's just too much.

Re:Request bodies in GET requests by dastbe on Monday January 31, 2022 @03:26PM (#30153788)
while that could be preferred, here's some reasons why it may not be

1. pre-existing behavior. maybe queries have only started getting big enough to where this mattered, but all of our existing clients communicate the original way and won't migrate

2. more complex behavior on clients and services as you've now introduced a new stateful resource between client and service. should clients store query ids, or does the service handle idempotency? what db does the service use to store queries? how do we limit stored queries? do clients have to manage number of queries stored? does the service?

Re:Request bodies in GET requests by fooey on Monday January 31, 2022 @09:22PM (#30157832)
and you just re-invented stored procedures and/or RPC

pretty much the same pro's and con's too

safer, more controlled, better optimized but it's more limiting, another dev dependency and a responsibility bottleneck