Answer the question
In order to leave comments, you need to log in
Rest when building websites?
Good day
Can anyone tell me more about how restip works when creating a website?
That is, as far as I know, rest gives us only the necessary data, for example json
But how does the browser know how to use it to display the page to the client?
If we have some kind of application created specifically for the client, and it sends a request, then it knows all this, for example this online bank application what we put on the phone
And if we go through the browser to the site in the bank's personal account, then the client is here the browser and he has no idea how to use the json that he will receive
I hope you understand my question
Answer the question
In order to leave comments, you need to log in
The API is the server
The API client is (our special case!) JS in the browser.
1. The client requested
2. The API returned the data (e.g. in JSON)
3. The API client placed it in the DOM (processed the received data)
4. The user saw the result on the API screen
and the API Client always checks the version of the exchange protocol, and if it is updated to server, the client updates itself or asks the user to update.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question