index.js
function getUrl (url) {
  var opt = {
    url: url
  , timeout: 10000 // 10 seconds
  }
  ;
  return new Promise(function(resolve, reject){
    request(opt, function(err, res, body){
      if (err) { return reject(err); }
      resolve(body)
    });
  });
}
function getUrl (url) {
  var opt = {
    url: url
  , timeout: 10000 // 10 seconds
  }
  ;
  return new Promise(function(resolve, reject){
    request(opt, function(err, res, body){
      if (err) { return reject(err); }
      resolve(body)
    });
  });
}
function getUrl ( url ) { var opt = { url : url , timeout : 10000 // 10 seconds } ; return new Promise ( function ( resolve , reject ) { request ( opt , function ( err , res , body ) { if ( err ) { return reject ( err ) ; } resolve ( body ) } ) ; } ) ; }
A promise wrapper arount `request`. It timeout the request after 10 sec
@private
@param  {String} url
@return {Promise} - resolve {String} with the request's body. Could be an `html` or `css`.
A promise wrapper arount request . It timeout the request after 10 sec