Comparing version 3.0.1 to 3.0.2
@@ -25,8 +25,8 @@ var http_1 = require('http'); | ||
function open(request) { | ||
var maxRedirects = num(request.options.maxRedirects, 5); | ||
var followRedirects = request.options.followRedirects !== false; | ||
var url = request.url, method = request.method, body = request.body; | ||
var url = request.url, method = request.method, body = request.body, options = request.options; | ||
var maxRedirects = num(options.maxRedirects, 5); | ||
var followRedirects = options.followRedirects !== false; | ||
var requestCount = 0; | ||
var confirmRedirect = typeof request.options.followRedirects === 'function' ? | ||
request.options.followRedirects : falsey; | ||
var confirmRedirect = typeof options.followRedirects === 'function' ? | ||
options.followRedirects : falsey; | ||
function get(url, method, body) { | ||
@@ -44,4 +44,7 @@ if (requestCount++ > maxRedirects) { | ||
arg.headers = request.headers; | ||
arg.agent = request.options.agent; | ||
arg.rejectUnauthorized = request.options.rejectUnauthorized !== false; | ||
arg.agent = options.agent; | ||
arg.rejectUnauthorized = options.rejectUnauthorized !== false; | ||
arg.ca = options.ca; | ||
arg.cert = options.cert; | ||
arg.key = options.key; | ||
if (!arg.agent) { | ||
@@ -48,0 +51,0 @@ arg.agent = isHttp ? agent.http.globalAgent : agent.https.globalAgent; |
{ | ||
"name": "popsicle", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Simple HTTP requests for node and the browser", | ||
@@ -5,0 +5,0 @@ "main": "dist/common.js", |
@@ -89,2 +89,5 @@ # ![Popsicle](https://cdn.rawgit.com/blakeembrey/popsicle/master/logo.svg) | ||
* **followRedirects** Disable redirects or use a function to accept `307`/`308` redirects (default: `true`) | ||
* **ca** A string, `Buffer` or array of strings or `Buffers` of trusted certificates in PEM format | ||
* **key** Private key to use for SSL (default: `null`) | ||
* **cert** Public x509 certificate to use (default: `null`) | ||
@@ -91,0 +94,0 @@ **Options using browser transport** |
Sorry, the diff of this file is not supported yet
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
162232
2015
396