B
B
Bastax132019-01-01 14:08:16
RESTful API
Bastax13, 2019-01-01 14:08:16

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

2 answer(s)
S
stratosmi, 2019-01-01
@stratosmi

It's okay to mix.
They have different tasks. WebSocket forms an operational two-way communication, which the REST API does not provide

I
Ivan Shumov, 2019-01-01
@inoise

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 question

Ask a Question

731 491 924 answers to any question