3 ms·
When I was learning webdev (around early 2010s) I was very confused about exactly that. I couldn’t even comprehend how and why API of a web service could or nee
by LudwigNagasena 3y ago
When I was learning webdev (around early 2010s) I was very confused about exactly that. I couldn’t even comprehend how and why API of a web service could or need to be RESTful in the proper sense of the word. HTML is the REST API of the web. It allows people to dynamically navigate webpages to get what they want. Most APIs don’t need to be REST and to follow HATEOS: no one is going to explore them on the spot. So it’s just RPC built upon HTTP semantics (and sometimes not even that when everything is just POST requests with weird URIs).
Many tutorials back then explained what REST is and then explained what RESTful API is. And they seemed like two totally different things. I thought I am not getting something. Thankfully, at some point I realised that all those tutorials and people were just parroting bullshit. At best one could say that JSON over HTTP is REST-like compared, for example, to websockets.