How can I send headers for the handshake with the browser APIs WebSocket? #5002
-
I would like to do, what socket.io does, but I want to do it without socket.io, because I do not need all the other stuff, and I do not want to increase traffic by using it just for that. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi!
This is not possible, as the WebSocket API in the browser does not provide a way to send HTTP headers. Postman can do it because it's a Node.js client under the hood. References: |
Beta Was this translation helpful? Give feedback.
-
Like this https://github.com/guest271314/direct-sockets-http-ws-server |
Beta Was this translation helpful? Give feedback.
Hi!
This is not possible, as the WebSocket API in the browser does not provide a way to send HTTP headers. Postman can do it because it's a Node.js client under the hood.
References: