Home>

Request method like below? Is it possible to set a timeout for a message?
I want to achieve an operation that returns a timeout if it takes more than 10 seconds.

var request = require ('request');
  if (err) {
    console.log ('Error:' + err.message);
    return;
  }
  console.log (body);
});