Vote count:
0
I am quite new to this thing. I just wanted to know if it is possible to get the web sockets client side request header. I'm using in the server side node.js:
Using ExpresJS I can get headers like:
router.post('/', function (req, res, next) {
console.log(req.headers);});
Using Web Socket, its possible?
var WebSocket = require('ws');
var ws = new WebSocket('ws://www.host.com/path');
ws.on('open', function open() {
// how to get the headers
ws.send('something');
});
It is possible? Thanks
asked 44 secs ago
How can i get the headers request from client side for sockets using NodeJS
Aucun commentaire:
Enregistrer un commentaire