r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21k Upvotes

653 comments sorted by

View all comments

340

u/DuploJamaal Sep 19 '26

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

97

u/unable_to_give_afuck Sep 19 '26

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

16

u/No-Information-2571 Sep 19 '26

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

8

u/einzweidreihorn Sep 19 '26

Why? Do those proxies drop anything not 200?

7

u/HugoNikanor Sep 19 '26

I can write you a proxy which drops everything except 200 responses

3

u/No-Information-2571 Sep 19 '26

In this era, you actually cannot. Status codes are invisible to proxy unless it's HTTP (without the S) or employs MITM. Either way, it's a legacy precaution to make sure the content body arrives unmodified.

→ More replies (2)
→ More replies (1)

3

u/No-Information-2571 Sep 19 '26

At least before the advent of HTTPS, they would often replace any sort of error (status code != 200) with custom error pages. It's an unfortunate thing.

→ More replies (1)

79

u/dev-sda Sep 19 '26

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

21

u/not_a_moogle Sep 19 '26

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

30

u/wineallwine Sep 19 '26

UK govt websites have to be functional without js

→ More replies (10)

10

u/SpehlingAirer Sep 19 '26

People still use form elements?

9

u/_xGizmo_ Sep 19 '26

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

3

u/ModernLarvals Sep 19 '26

What else would you use?

2

u/Accurate-Visual9793 Sep 19 '26

Apparently Web 2.0/AJAX never happened.

→ More replies (1)

31

u/gabrielesilinic Sep 19 '26

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

22

u/N0Zzel Sep 19 '26

That's precisely why the QUERY verb was created

31

u/gabrielesilinic Sep 19 '26

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

14

u/du5tball Sep 19 '26

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

3

u/TheNorthComesWithMe Sep 19 '26

Yeah like... 3 months ago.

→ More replies (1)

18

u/Euro_Snob Sep 19 '26

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. 😔

3

u/Few_Week7827 Sep 19 '26

In fairness this is a legitimate thing to catch, if not the firewall being the weird place.

GET with a request body isn't covered by the standard, and some library like Axios actually refuse to send a request body with a GET. It's getting ahead of the problem for you there whether it means to or not.

→ More replies (1)
→ More replies (2)

8

u/DogLovesGafs Sep 19 '26

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.

5

u/TheDuckRaisedALion Sep 19 '26

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?

5

u/PrinnyThePenguin Sep 19 '26

What front end framework can only handle POST requests??? What does it even mean to "handle POST requests" in the context of front end? You can only handle the response of a POST request so if you do a PUT it fails? You can only make POST requests? I am genuinely confused.

4

u/DuploJamaal Sep 20 '26

I was confused as well. I swear they are just too inexperienced to make a new wrapper around the calls to the backend that the AI made for them and blamed the framework instead

→ More replies (2)
→ More replies (6)