Open not7cd opened 5 months ago
Quick search suggests changing the url from ws://
to wss://
.
I was able to hack a solution in transpiled JS.
Two fixes were needed in my case.
Append /
to /api/v1/streaming
. This solved 301 redirect to /api/v1/streaming/
. Not sure where this came from.
I also had to add .trim()
in Streaming
, as for some reason, space %20
was being added here. It may be a bug coming from my implementation in Node-RED. But it may be worth to add sanitization in the lib.
parameter.push("access_token=".concat(accessToken.trim()));
Which server did you use? Please provide a sample code to reproduce this.
As I'm trying to connect to my instance with
client.publicStreaming()
, I'm getting this exceptionIt may be connected to a default nginx config that forces TLS? I'm not sure how to debug this. I'm using a slightly modified streaming example from readme. https://github.com/not7cd/node-red-contrib-megalodon/blob/fa9c3b49f51208cffb59d793108b79ab563de272/src/streaming.js