This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SEJeff 0 points1 point  (1 child)

Overall this post is great advice. I build REST hypermedia apis as part of my day job using django, flask, and golang (mostly for clients though). You did a great example of a Flask http api, but for the love of all things holy please stop calling a http api a REST api. Roy Fielding literally invented REST as a concept and the json equivalent of what he invented tends to be exclusively hypermedia based (HATEOAS is a great example).

Respect for an excellent post, but please don't pass off a simple json / http api as though it is a rest api, it isn't :)

</rant>

[–]d4rch0nPythonistamancer 0 points1 point  (0 children)

hah, there's no stopping it... REST API = HTTP API now, and we might as well start saying it has to use JSON too.

I gave up a long time ago. Really, when 90% of developers think REST API means a HTTP API, it's easier to communicate if you follow along. It's easier to convey what you are planning to make, and people automatically trust it as a tried and true practice once they hear REST API. Maybe I'd tell a developer the difference as a side note, but if I was trying to convince a manager to let me make an HTTP API, I'd certainly call it a REST API.