pmu-tech / stub-server

Stub server for REST APIs
MIT License
12 stars 2 forks source link

Support WebSockets #17

Open tkrotoff opened 3 years ago

tkrotoff commented 3 years ago

Should we use https://github.com/sockjs/sockjs-node or the HTML5 API https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API ?

tkrotoff commented 2 years ago

The data flow between REST APIs (unidirectional) and WebSockets (bidirectionnal) are very different:

Implementations:

(the client == the user == the browser)

Because of the nature of WebSockets (bidirectional and unknown protocol/format) I don't think it is possible to add support for WebSockets inside stub-server. WebSockets is lower-level compared to REST.