title: Node.js - HTTP get through Squid proxy authorization issue
body: <p>I am trying to make a simple request using http.get.  But I need to make this request through Squid proxy.  Here's my code:</p>
  
  <pre><code>var http = require('http');
  var username = 'username';
  var password = 'password';
  var host = "proxy_host";
  var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
  
  var options = {
    host: host,
    port: 3128,
    path: "http://www.google.com",
    authorization: auth,
    headers: {
      Host: 'www.google.com'
    }
  };
  
  var req = http.request(options, function(res) {
    console.log('STATUS: ' + res.statusCode);
    console.log('HEADERS: ' + JSON.stringify(res.headers));
  });
  
  req.end();
  </code></pre>
  
  <p>My username and password is correct according to the ops team that set up the proxy.  The problem is that I keep getting a 407 - authorization required status coming back.</p>
  
  <p>Is there something wrong with the way I am making the request? Or does Squid proxy need to be configured?</p>
  
  <p>Thanks in advance.</p>