3 ms·
I don't know if you read the article. REST is a post-hoc description of how the web worked (at the time it was made). You had web pages with hyptertext conten
by hsn915 4y ago
I don't know if you read the article.
REST is a post-hoc description of how the web worked (at the time it was made).
You had web pages with hyptertext content, and that included forms. The forms had fields with names and an "action" destination.
The client (the browser) knows nothing about the server or even its APIs. It just knows how to send an HTTP request with parameters. In the case of forms, those parameters were encoded in the body of a POST request. That's it.
There was no "client side code" that talked to the server.
The "client side" is literally just the browser. Talking to the server is done by the user clicking links and filling forms.
I don't think the article is particularly encouraing you to program this way in 2022. Just telling you that if you are not programming in this way, do not call what you are doing "REST", because it is not.
- hyperhopper 4y agoThen they can't call it a REST API: it's not programmatic, so it's not an API Aka somebody pulled some ancient obscure definition out of nowhere that just means _everybody_ is wrong.
- hsn915 4y agoIt's only obscure for people who arrived at the scene long after the distortion of terms already took place, and never studied where the terminology comes from.