I'm trying to write a simple websocket client to connect to a device. However the device expects a username and password and I'm having quite a bit of trouble finding how to pass that with the connection.
This is one of the ways I've tried it.
var io = require('socket.io-client'),
socket = io.connect('192.168.1.25/eventstream',
{username: 'Admin', password: 'Admin'});
I'm sorry if this is something simple, node/socket.io are new to me so searching with the right terms is difficult. Any links are appreciated.
io.connect('http://Admin:[email protected]/eventstream')socket = io.connect('192.168.1.25/eventstream', {Sec-WebSocket-Version: 13, Sec-WebSocket-Key: 'sL7YXg61Aqzr7HXA3M9Gow==', Authorization: 'Basic QWRtaW46QWRtaW4=', Connection: 'keep-alive, Upgrade', Upgrade: 'websocket'}?