-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I set a custom header? #66
Comments
you can pass in your own |
Yes, I could do that. But the disadvantage is that I have to add Why not have a third parameters |
@maxogden Also you'll risk that versions of WS do not match when you add ws as an external dependency. Not so good I think. |
It seems it might be just a I am ok for passing through the |
yea that sounds good to me |
👍 |
Ok, now that you have agreed on this, here a small PR #67 @mcollina If you dig deeper, it turns out that WebSocket.js already treats the protocols argument as options under some circumstances, see https://github.com/websockets/ws/blob/master/lib/WebSocket.js#L49 |
On the client side, in the
websocket()
constructor, how can I set a custom header there? I need this for an API ...The text was updated successfully, but these errors were encountered: