agent-base
Advanced tools
Comparing version 4.1.0 to 4.1.1
4.1.1 / 2017-07-20 | ||
================== | ||
* Correct `https.request()` with a String (#9) | ||
4.1.0 / 2017-06-26 | ||
@@ -3,0 +8,0 @@ ================== |
{ | ||
"name": "agent-base", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Turn a function into an `http.Agent` instance", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -14,4 +14,4 @@ 'use strict'; | ||
return function(_options, cb) { | ||
let options | ||
if (typeof options === 'string') { | ||
let options; | ||
if (typeof _options === 'string') { | ||
options = url.parse(_options); | ||
@@ -18,0 +18,0 @@ } else { |
@@ -446,2 +446,13 @@ /** | ||
it('should work with a String URL', function(done) { | ||
var endpoint = 'https://127.0.0.1:' + port; | ||
var req = https.get(endpoint); | ||
// it's gonna error out since `rejectUnauthorized` is not being passed in | ||
req.on('error', function(err) { | ||
assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT'); | ||
done(); | ||
}); | ||
}); | ||
it('should work for basic HTTPS requests', function(done) { | ||
@@ -448,0 +459,0 @@ var called = false; |
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
31470
722