Answer the question
In order to leave comments, you need to log in
Is mixing WebSocket and REST okay?
The site has a chat and a few other elements updated with WebSocket. At the same time, during the initial loading of the site, the generated template is given using REST.
Is it okay to mix these 2 approaches or is it better to switch to one?
Answer the question
In order to leave comments, you need to log in
It's okay to mix.
They have different tasks. WebSocket forms an operational two-way communication, which the REST API does not provide
API: for actively influencing the
WS system: for real-time messages and subscriptions to server events (reaction)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question