WebSocket-Node
WebSocket-Node copied to clipboard
Unable to connect with auth info in url and special characters
My connection URL is something like:
wss://user:[email protected]/path
When I try to connect to this URL using plain WebSocket in the browser it has no issue, but with WebSocketClient I get a 401 response from the server. Somehow the auth information is not being sent.
You are right, this is an oversight!
This code should be passing the auth
property as part of the requestOptions
object.
https://nodejs.org/dist/latest-v20.x/docs/api/http.html#httprequesturl-options-callback