Answer the question
In order to leave comments, you need to log in
Are JS APIs and REST APIs different concepts?
Just started learning how to build API for nodeJs server.
The web is full of tutorials on building a REST API on a NodeJS server.
Is it possible to make a JS API?
this is how I understand the difference between JS and REST:
JS works according to the principle: I connected a js sdk to the client, which connects the client to the server, and then you can write all calls in pure js
Example: backendless.com/documentation/data/js/data_basic_s .. .REST
- all calls with curl.
Example: backendless.com/documentation/data/rest/data_basic...
So, I like js much more in this sense.
1. What is another fundamental difference between REST and JS API?
2. Why is REST more popular? except that REST is not tied to JS syntax.
Answer the question
In order to leave comments, you need to log in
1. REST has nothing to do with CURL.
2. A well-established concept of JS API does not exist, it has developed exclusively in your head.
3. The opposite of REST (and STATEless) is STATEful, i.e. communication without state and with state. Without a state, each request is separate and does not put the server into another state, does not put the connection (or session) itself into a state, and does not put the client into another state. In fact, almost everything that is called REST is not, see my article habrahabr.ru/post/204958
4. Most likely you want to ask about the contrast between the HTTP API and the RPC API. Unlike the HTTP API (which is usually called the REST API out of ignorance or brainwashing), remote procedure call (RPC API) for can be done based on TCP, UDP, TLS, or emulated for the web on WebSocket or HTTP + SSE or other protocols.
You are confusing warm with soft.
REST is a methodology, working with such api can be implemented on any technology (including js), server-side implementation too.
JS API is already a specific implementation of the client library. On the server with which this library works, there may be a REST api.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question