Answer the question
In order to leave comments, you need to log in
How to change the processing status of a REST request via WebSockets?
There is an AngularJS SPA that works with a NodeJS server via a REST API.
I would like to teach it to receive changes in the status of processing REST requests from the server, because some of them take quite a long time.
An example of changes in the processing status of a REST request.
Answer the question
In order to leave comments, you need to log in
In RESTful, there is such a practice: to return as a response to the user not data, but the status 202 Accepted along with a link by which the client itself monitors the state of the process, i.e. the same http requests. Link something like this: /resource/id, id must always be unique, without collisions. You need to create a queuing mechanism on the server side.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question