title: Node.js Requests returning 301 redirects
body: <p>I'm brand new to node.js, but I wanted to play around with some basic code and make a few requests. At the moment, I'm playing around with the OCW search (<a href="http://www.ocwsearch.com/" rel="noreferrer">http://www.ocwsearch.com/</a>), and I'm trying to make a few basic requests using their sample search request: </p>
  
  <p>However, no matter what request I try to make (even if I just query google.com), it's returning me</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;
  &lt;body bgcolor="white"&gt;
  &lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;
  &lt;hr&gt;&lt;center&gt;nginx/0.7.65&lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm not too sure what's going on. I've looked up nginx, but most questions asked about it seemed to be asked by people who were setting up their own servers. I've tried using an https request instead, but that returns an error 'ENOTFOUND'.</p>
  
  <p>My code below:</p>
  
  <pre><code>var http = require('http');
  
  http.createServer(function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});
      response.end('Hello World\n');
  
      var options = {
        host:'ocwsearch.com',
        path:
        '/api/v1/search.json?q=statistics&amp;contact=http%3a%2f%2fwww.ocwsearch.com%2fabout/',
        method: 'GET'
      }  
  
  
      var req = http.request(options, function(res) {
        console.log("statusCode: ", res.statusCode);
        console.log("headers: ", res.headers);
        res.on('data', function(d) {
              process.stdout.write(d);
        });
      });
      req.end();
  
      req.on('error', function(e) {
        console.error(e);
      });
  
  
  }).listen(8124);
  
  console.log('Server running at http://127.0.0.1:8124/');
  </code></pre>
  
  <p>Sorry if this is a really simple question, and thanks for any help you can give!</p>