You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Can you just try it using require("https://raw.githubusercontent.com/espruino/EspruinoDocs/master/modules/ws.js") - maybe with your own GitHub?

    I'd rather not stick that code in just so you can test, especially as it's a bit confusing (eg, if you can stick your own headers in there, they just get ignored).

    I'm guessing you're using in ESP8266 then? I'm kind of surprised it didn't give you an error when it tried to build the key? As far as I can tell, nothing stops you from just doing:

    this.ws = new WS( this.serverHost, { port:8822 } );
    this.ws.key = {
      source : "...", 
      hashed :  "..."
    };
    
About

Avatar for Gordon @Gordon started