I'm able to connect to our sync gateway using the traditional HTTP rest end points via an XHR request from the browser. I'd like to be able to subscribe to a web socket feed that'll notify my application of changes real-time however.
Can anyone give me some further details on how best to implement this? By simply adding the feed=websocket parameter to the query string, gives me an empty response with a response code of 0. Should I still use the HTTP protocol in the URL or WS? Should the initial HTTP request get upgraded to websocket? (The WebSocket object in the browser expects the ws or wss protocol.)
Any pointers would be appreciated.