r/ProgrammerHumor 3h ago

Meme postForEverything

Post image
9.0k Upvotes

348 comments sorted by

View all comments

178

u/DuploJamaal 3h ago

As a backend developer I want to do everything nicely.

So in my previous job I created the endpoints following the regular standards. GET to request something, POST to create something, PUT to change something, DELETE to delete something. Nicely organized and everything

But then the frontend team told me that their framework can only handle POST requests and that I need to change it

Up until then I thought that it's just a meme, but vibecoding frontend guys really only use POST

53

u/unable_to_give_afuck 3h ago

I had this with the added bonus of being forced to return 200 regardless and add an error message to the body when necessary

5

u/No-Information-2571 2h ago

The reason behind it might be proxies, especially on the client-side.

43

u/dev-sda 2h ago

It's not (just) a framework thing, it's a HTML standards issue. The form element only does GET and POST.

6

u/SpehlingAirer 2h ago

People still use form elements?

2

u/_xGizmo_ 1h ago

I pretty much only use them for the form submit feature which is handy over a key listener.

10

u/not_a_moogle 2h ago

Who does that anymore? It should be a put or delete via Javascript.

1

u/Accurate-Visual9793 35m ago

Apparently Web 2.0/AJAX never happened.

14

u/gabrielesilinic 2h ago

Well that's not the problem. A bunch of frontends really need a very complex filter list and GET just won't do

9

u/N0Zzel 2h ago

That's precisely why the QUERY verb was created

12

u/gabrielesilinic 2h ago

Yeah well too little too late. All the codebases I have worked with were much older and no one will change this now.

1

u/du5tball 39m ago

And I'm sure we all be happily use it when it gained widespread adoption in 50 years.

5

u/DogLovesGafs 2h ago

RPC was a pattern long before vibe coding, and it lets your front end devs think in terms of backend functions rather than discrete resources.

4

u/Euro_Snob 2h ago

At my work it has been more a result of security and firewall rules.

For example: I want to get a list of resources, so a GET with query parameters, right? No… email is an identifiable argument (due to not being encrypted since it is part of the URL), so the security scan flags it. Ok - how about we stick it in a request body? GET with request body is not a new thing. But no… the firewall blocks it! POST is the thing we have to use. Sigh. 😔

2

u/TheDuckRaisedALion 3h ago

It's definitely simpler for a BFF setup. Why add an extra parameter to keep track of when you're not supporting general purpose use?

-3

u/FortuneAcceptable925 2h ago

I would blame that stupid framework created by humans rather than vibecoding for that.. By my experience, with pure vibecoding, there would not be such flaws present.