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:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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: