Comparing version 1.1.0 to 1.2.0
var async = require('async'); | ||
var url = require('url'); | ||
var httpreq = require('httpreq'); | ||
var ntlm = require('./ntlm'); | ||
var HttpsAgent = require('agentkeepalive').HttpsAgent; | ||
var keepaliveAgent = new HttpsAgent(); | ||
@@ -11,2 +10,18 @@ exports.get = function(options, callback){ | ||
// is https? | ||
var isHttps = false; | ||
var reqUrl = url.parse(options.url); | ||
if(reqUrl.protocol == 'https:') isHttps = true; | ||
// set keepaliveAgent (http or https): | ||
var keepaliveAgent; | ||
if(isHttps){ | ||
var HttpsAgent = require('agentkeepalive').HttpsAgent; | ||
keepaliveAgent = new HttpsAgent(); | ||
}else{ | ||
var Agent = require('agentkeepalive'); | ||
keepaliveAgent = new Agent(); | ||
} | ||
async.waterfall([ | ||
@@ -13,0 +28,0 @@ function ($){ |
{ | ||
"name": "httpntlm", | ||
"description": "httpntlm is a Node.js library to do HTTP NTLM authentication", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"dependencies": { | ||
@@ -6,0 +6,0 @@ "httpreq": "~0.3.4", |
@@ -32,7 +32,7 @@ # httpntlm | ||
Currently only supports __https__ | ||
Should support __http__ and __https__ now. Though, I've not tested it on http. | ||
## Advanced | ||
If you want to use the NTLM-functions yourself, you can access the ntlm-library like this: | ||
If you want to use the NTLM-functions yourself, you can access the ntlm-library like this (https example): | ||
@@ -39,0 +39,0 @@ ```js |
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
20370
364