Skip to content
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 do I add request headers when I establish a websocket connection? #103

Open
JieGz opened this issue Dec 26, 2018 · 7 comments
Open

Comments

@JieGz
Copy link

JieGz commented Dec 26, 2018

Hello, I need to carry a "token" message on the head of the request when I first establish a websocket connection. What should I do?

@ciiiii
Copy link

ciiiii commented Apr 10, 2019

+1

@thisismydesign
Copy link

Also a blocking issue for me

@alberto-f
Copy link

WebSocket API does not provide any method for specifying additional headers.

In the link below, it says some ways to add token authentication
https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api

I hope this helps.

@Gr8z
Copy link

Gr8z commented Oct 24, 2019

image

I can do this in the ws package but not on this one, any idea why it's not supported?

@PaulWieland
Copy link

+1 for me. I am currently using faye-websocket which supports sending headers required for authentication.

@Jacob273
Copy link

image

I can do this in the ws package but not on this one, any idea why it's not supported?

Thanks for posting this screenshot :)

@Pesya1
Copy link

Pesya1 commented Dec 21, 2022

I have reconnecting-websocket with ws, how can I pass the headers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants