title: Socket.IO With basic authentication on Node
body: <p>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.</p>
  
  <p>This is one of the ways I've tried it.</p>
  
  <pre><code>var io = require('socket.io-client'),
      socket = io.connect('192.168.1.25/eventstream', 
      {username: 'Admin', password: 'Admin'});
  </code></pre>
  
  <p>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.</p>