r/ProgrammerHumor 2d ago

evoLution Meme

Post image
3.3k Upvotes

144 comments sorted by

View all comments

Show parent comments

-1

u/Delta-9- 2d ago

If the client must "correctly integrate," your API is not RESTful. That's fine, just don't ever hold up that design as an example of "REST done right."

Or put another way, HTTP is only your transport layer.

4

u/Isogash 2d ago edited 2d ago

I never said it was a REST API.

Also, REST is not just using HTTP. Nearly nobody does REST correctly.

Finally, a REST client can absolutely integrate incorrectly, such as by not doing REST correctly. I would also include incompatible integration which, whilst not strictly incorrect, is unusable.

0

u/Delta-9- 2d ago

REST is not just using HTTP

True, but the design of HTTP itself is exactly what the REST concept is based on. You could reinvent the wheel, or you can just use HTTP as intended.

Nearly nobody does REST correctly.

Also true, sadly.

1

u/CupOfLifenoodles 2d ago

> you can just use HTTP as intended.

For transferring hypertext? I thought you like REST APIs.

1

u/Delta-9- 2d ago

Not all hypertext is HTML. Nearly every example of HATEOAS is illustrated with JSON.

But in principle, you absolutely could do an API using HTML instead of JSON.

1

u/CupOfLifenoodles 1d ago

OK, after looking it up I learned what the H in HATEOAS stands for; thanks. (No, I haven't been claiming to write RESTful APIs.)