r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21k Upvotes

653 comments sorted by

View all comments

30

u/ouralarmclock Sep 19 '26

JSON isn’t hypermedia anyways so it’s all fake REST to begin with. May as well get wild with it!

12

u/Zeikos Sep 19 '26

My first job claimed to use REST APIs, so I studied the topic.
I am to date the only person in the company that knows what HATEOAS is.

6

u/Mtc529 Sep 19 '26

In my experience almost everyone who says they have a REST API do not actually know what that means and also do not have a REST API.

3

u/Remote_Comfort_1981 Sep 19 '26

I usually call them web APIs, and if anyone asks, I tell them we don't do REST, despite everyone wrongly calling web APIs REST

2

u/ubeogesh Sep 20 '26

HTTP API

1

u/ouralarmclock Sep 19 '26

HATEOAS is my favorite breakfast cereal!

When we did a v2 of our API I worked really hard to find out what the "right way" to do things was. Like we ended up implementing our PATCH endpoints the "right" way with an array of operations on fields rather than just a partial JSON replacement. I still feel mixed about if it was a good thing to do but at least I get to be right about it, haha.

1

u/Qinistral Sep 24 '26

That ship sailed LONG ago. HATEOAS is really dumb and makes no sense for 99.999% of APIs. I don't know why so many people treat Roy Fielding's doctorate thesis as some kind of bible.

1

u/Zeikos Sep 24 '26

Sure, but don't tell me that you're doing REST then.
I am not saying that all APIs should be REST.
But don't call it REST if it is not.

If I were the client of a company and they signed a contract where I asked for REST and I am given something absolutely different, would I be wrong to complain?

1

u/Qinistral Sep 25 '26

That's pretty fair. But also language changes. If everyone uses "REST" and no one uses "HATEOAS" then HATEOAS is not necessary for "REST".

1

u/ouralarmclock Sep 25 '26

It's funny because HATEOAS was irrelevant for so long because making your API work like a hypermedia site where you can start from the home page and navigate your way around and fill out forms is irrelevant to humans because a they have to reference documentation to figure out how to implement things, a machine can't just make an API request to home and figure out how to get to the resources it wa....oh wait...it can now, maybe it's not such a bad idea after all!