title: nodejs request library, get the response time
body: <p>Using the nodejs <code>request</code> library: <a href="https://github.com/mikeal/request">https://github.com/mikeal/request</a></p>
  
  <pre><code>var request = require('request');
  request('http://example.com', function (error, response, body) {
     ...
  })
  </code></pre>
  
  <p>Is it possible to get the response time on the callback?
  The doc mentions response.statusCode. looking at the library source code I also see undocumented response.headers and response.href, but I don't see responseTime or similar.</p>
  
  <p>or, is there an alternative library to <code>request</code> that provides the response time?</p>
  
  <p>ps: I know I could do something like this, but that's not a solution, as I am making many async requests and I cannot control when each request will be started.</p>
  
  <pre><code>var request = require('request');
  var start = new Date();
  request('http://example.com', function (error, response, body) {
     ...
     var responseTime = new Date() - start;
  })
  </code></pre>