title: node.js: how to stop an already started http request
body: <p>We use <a href="https://github.com/mikeal/request">request</a> to make http requests with node.js.
  We would like to give the user an opportunity to abort the request when he decides. That means we have to trigger the abort() from outside the request function. Maybe we can check an outside variable from inside the function.
  (We already tried to set the timeout to zero after the request started, that doesn't work.)
  Maybe we set the variable request to null. Do you know a better way to do this?</p>
  
  <p>here is example code to show what kind of request we are talking about:</p>
  
  <p>app.js:</p>
  
  <pre><code>var http = require('http');
  var request = require("request");
  
  http.createServer().listen(1337, "127.0.0.1");
  
  request({uri: 'http://stackoverflow.com'  }, function (error, response, body) {
      console.log('url requested ') ;
      if (!error){
          console.log(body);
      }
      else
      {
          console.log(error);
      }
  });
  </code></pre>