title: Keep Getting Bad Request from HTTP.request in Node.js
body: <p>I just installed Node.js and perhaps I'm missing something but I'm trying a simple http.request and get nothing but 400 responses.  I've tried several hosts with no luck. I installed Node from their site, this didn't work, so I uninstalled and installed via Homebrew and get the same output of "400". I'm specifically wondering if there's something I need to change on my Mac to allow Node to send requests.</p>
  
  <p>OSX 10.8.4
  Node 0.10.13
  Homebrew 0.9.4</p>
  
  <pre><code>var http = require("http");
  
  var req = http.request({
      host: "http://google.com"
  }, function(res){
      if (res.statusCode === 200) console.log(res);
      else console.log(res.statusCode);
  });
  
  req.on("error", function(err){
      console.log(err);
  });
  
  req.end();
  </code></pre>
  
  <p>I appreciate any help. Thanks!</p>