Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

“RESTful” API design is mostly bike-shedding.

There’s no standard. Every REST API looks different. Clients have to refer to documentation anyway, so consistent URL patterns achieve nothing. People waste large amounts of time over totally inconsequential minutiae like whether to use singular or plural words in URLs.

Separating idempotent calls from non-idempotent calls is useful, but REST overcomplicates this. All that’s needed is read and write calls, yet REST has get, post, patch, put, delete…

REST is also inefficient. Clients could read the data they need in one HTTP request, but most “RESTful” APIs force clients to make many requests for the sake of what is essentially aesthetics.



Agree. But I pick REST (or “json over http”) any day of the week instead of graphql, soap, grpc, etc.


Graphql just for the sake of graphql is a disaster for backend engineers.


I want to hug you right now.


You are supposed to do use those 3 through some kind of heavy tool, while it's well understood that you do rest with just an http library.

Rest is simpler, but comes at the cost of a lot of nice things like automatic endpoints generation and type verification. The problem is that the heavy tooling tends to not be there or not work correctly. But this is not a win for that kind of simplicity, that's a reason to improve the protocol design.



JUP - Just Use POST




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: