How to use the DEFAULT_TIMEOUT function from request

Find comprehensive JavaScript request.DEFAULT_TIMEOUT code examples handpicked from public code repositorys.

7496
7497
7498
7499
7500
7501
7502
7503
7504

options.callback = callback
options.method = options.method || 'GET';
options.headers = options.headers || {};
options.body    = options.body || null
options.timeout = options.timeout || request.DEFAULT_TIMEOUT

if(options.headers.host)
  throw new Error("Options.headers.host is not supported");
fork icon1
star icon0
watch icon1