bagofholding
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,2 +0,5 @@ | ||
### 0.1.4-pre | ||
### 0.1.5-pre | ||
* Add http#req timeout handling, default timeout changed to 2000 milliseconds | ||
### 0.1.4 | ||
* Add http#req headers, payload (body, form, json, multipart), and requestOpts handling | ||
@@ -3,0 +6,0 @@ |
@@ -0,1 +1,2 @@ | ||
/*jshint esnext: true */ | ||
var request = require('request'); | ||
@@ -17,2 +18,3 @@ | ||
* - body, form, json, multipart: request payload, exact map to mikeal/request module body, form, json, multipart opts | ||
* - timeout: request timeout in milliseconds, default to 2000 milliseconds | ||
* - requestOpts: mikeal/request module opts, these opts will override any params set by http#req | ||
@@ -24,4 +26,5 @@ * @param {Function} cb: standard cb(err, result) callback | ||
// init default settings with follow redirections on all methods, and 1 minute timeout | ||
var params = { url: url, followAllRedirects: true, timeout: 60000 }, | ||
const TIMEOUT = 2000; | ||
// init default settings with follow redirections on all methods, and 2 seconds timeout | ||
var params = { url: url, followAllRedirects: true, timeout: opts.timeout || TIMEOUT }, | ||
envProxy = proxy(url); | ||
@@ -114,2 +117,2 @@ | ||
exports.request = req; | ||
exports.proxy = proxy; | ||
exports.proxy = proxy; |
@@ -5,3 +5,3 @@ { | ||
"keywords": [], | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"homepage": "http://github.com/cliffano/bagofholding", | ||
@@ -8,0 +8,0 @@ "author": "Cliffano Subagio <blah@cliffano.com> (http://blog.cliffano.com)", |
@@ -25,2 +25,5 @@ Bag Of Holding [![Build Status](https://secure.travis-ci.org/cliffano/bagofholding.png?branch=master)](http://travis-ci.org/cliffano/bagofholding) [![Dependencies Status](https://david-dm.org/cliffano/bagofholding.png)](http://david-dm.org/cliffano/bagofholding) | ||
var bag = require('bagofholding'); | ||
bag.http.req | ||
bag.cli.*; | ||
@@ -27,0 +30,0 @@ bag.http.*; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18930
374
34