title: Get HTML page by URL
body: <p>Here is my code:</p>
  
  <pre><code> utilitesRouter.route('/url')
      .post(function(request, response) {
          console.log(request.body.uri);
          var urlOpts = { host: request.body.uri, path: '/', port: '80', method: 'GET' };
          var re = /(&lt;\s*title[^&gt;]*&gt;(.+?)&lt;\s*\/\s*title)&gt;/gi;
          http.get(urlOpts, function (response) {
              response.on('data', function (chunk) {
                  var str=chunk.toString();
                  console.log(str);
                  var match = re.exec(str);
                  if (match &amp;&amp; match[2]) {
                      console.log(match[2]);
                  }
              });    
          });
  
          response.json({ url: request.body.uri });    
      });
  </code></pre>
  
  <p>If I use POST request with this JSON <code>{"uri":"google.ru" }</code> I get:</p>
  
  <pre><code>302 Moved
  google.ru
  &lt;HTML&gt;&lt;HEAD&gt;&lt;meta http-equiv="content-type" content="text/html;charset=utf-8"&gt;
  &lt;TITLE&gt;301 Moved&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY&gt;
  &lt;H1&gt;301 Moved&lt;/H1&gt;
  The document has moved
  &lt;A HREF="http://www.google.ru/index.html"&gt;here&lt;/A&gt;.
  &lt;/BODY&gt;&lt;/HTML&gt;
  </code></pre>
  
  <p>If I use POST requiet with JSON <code>{"uri":"http://google.ru" }</code> I get the error message:</p>
  
  <pre><code>events.js:85
        throw er; // Unhandled 'error' event
              ^
  Error: getaddrinfo ENOTFOUND http://google.ru
      at errnoException (dns.js:44:10)
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
  </code></pre>
  
  <p>I can open <a href="http://google.ru" rel="nofollow">http://google.ru</a> in my browser.</p>
  
  <p>How can I get the HTML using node.js ?</p>