r/javascript • • Oct 31 '17

You Give REST a Bad Name

https://www.youtube.com/watch?v=nSKp2StlS6s
479 Upvotes

88 comments sorted by

View all comments

80

u/mothzilla Oct 31 '17

I worked at a company that had an API endpoint for every individual property of an object. (Think /object/5/getColour, object/5/getSize, object/5/getPrice)

They also used POST as a get mechanism. Sometimes. They thought their API was the bees testicles.

10

u/biinjo Oct 31 '17

I bet it hurt like bees testicles to work with that API

15

u/mothzilla Oct 31 '17

They complained when I bundled them all into one function (so it hit the api about 20 times).

But you're making 20 api calls, they said. Yes, I said. That's bad coding, they said.

10

u/bch8 Oct 31 '17

If they had an endpoint for every property weren't they already making a ton of api calls?

9

u/mothzilla Oct 31 '17

It evolved like Tetsuo.

1

u/bch8 Oct 31 '17

I'm not entirely sure what you mean

2

u/mothzilla Oct 31 '17

4

u/z500 Oct 31 '17

I never realized his fingers were growing fingers before.

2

u/_youtubot_ Oct 31 '17

Video linked by /u/mothzilla:

TitleChannelPublishedDurationLikesTotal Views
Akira: Tetsuo's EndKingDukas2010-08-220:08:252,454+ (92%)720,108

One of the greatest WTF moments in film history. From Akira.


^Info | /u/mothzilla can ^delete | v2.0.0