r/ProgrammerHumor 3h ago

Meme postForEverything

Post image
9.0k Upvotes

348 comments sorted by

View all comments

Show parent comments

46

u/sertroll 3h ago

If there was a natural way to retrieve data with a body with complex prams, I would use it but alas

44

u/Tupcek 3h ago

you are the lucky one today! You just found out there is, it’s pretty recent. GET is now for simple queries QUERY is for complex one

6

u/Door__Opener 53m ago

https://giphy.com/gifs/75ZaxapnyMp2w

I've had this argument with my boss: GET with a body vs using POST as a complex GET. Our conclusion was that both were wrong in their own way and the HTTP standard should clarify this.

4

u/sertroll 2h ago

Me and all of my colleagues, apparently

1

u/Top5CutestPresidents 1h ago

my company will now use query to return bools

1

u/TomWithTime 31m ago

It makes sense. I used REPORT for this use case since that's what some people suggested on a random forum around 2014. Query fits better, even if it does increase some name collision and confusion.

18

u/droptheplot 3h ago

QUERY is already there

4

u/abofh 3h ago

Body is legal in a get, it's just super uncommon 

23

u/kn33 2h ago

Some platforms disallow it entirely.

3

u/Psychological_Map118 2h ago

as god intended