title: Error: connect ECONNREFUSED issue in nodejs
body: <p>while I am trying to execute the following code segment, I 
  am getting the error... What is wrong with my code ?</p>
  
  <pre><code>node.js:201
          throw e; // process.nextTick error, or 'error' event on first tick
                ^
  Error: connect ECONNREFUSED
      at errnoException (net.js:646:11)
      at Object.afterConnect [as oncomplete] (net.js:637:18)
  </code></pre>
  
  <p>The code is to get the HTML contents from the URL</p>
  
  <pre><code>function request1() {
  
    http.get('http://ggggg/status', function(res){
          var str = '';
          console.log('Response is '+res.statusCode);
  
          res.on('data', function (chunk) {
                console.log('BODY: ' + chunk);
                 str += chunk;
           });
  
          res.on('end', function () {
               console.log(str);
          });
  
    });
  }
  
  request1()
  </code></pre>