Using the nodejs request library: https://github.com/mikeal/request
request
var request = require(\'request\'); request(\'http://example.com\', function (er
Something like
var timedReq = function(url, next) { var start = new Date(); request(url, function(err, res, body) { res.responseTime = new Date() - start; next(err, res, body); }); };
will do it for you. This seems small enough that it's probably easier than finding a new library.