WebSocket-Node icon indicating copy to clipboard operation
WebSocket-Node copied to clipboard

Unable to connect with auth info in url and special characters

Open chriscoindeskindices opened this issue 1 year ago • 1 comments

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.

chriscoindeskindices avatar Apr 23 '23 05:04 chriscoindeskindices

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

theturtle32 avatar Jan 20 '24 22:01 theturtle32