I require a WebSockets client that runs in client-side Javascript (not node.js) that can send an http header on the initial upgrade GET request. The MDN WebSocket that is available in the browser does not allow sending an http header. The header is required by the server and I have no control over how the server is configured.
Several languages/technologies have WebSockets APIs that allow sending headers, among them: Python, Node-js, .Net (with a hack).
I have no experience with WebAssembly. I'd like to find out if this approach might work, which language/technology might be best and I'm concerned that the resulting WebAssembly files will be very large.
Related SO questions:
Is it possible to implement websockets in Javascript with Streams api? HTTP headers in Websockets client API