From 4cae0672114cf4012788f13e83285513d8211ebd Mon Sep 17 00:00:00 2001 From: Martin Dirichs Date: Fri, 3 Mar 2017 15:00:46 +0100 Subject: [PATCH] Corrected the way basic authtication parameters are supplied to HttpClient --- lib/proxy.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/proxy.js b/lib/proxy.js index b0b3b86..a260dfa 100644 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -48,11 +48,7 @@ Proxy.prototype.invoke = function(method, args, callback) { }; if (this.username) { - options.auth = { - user: this.username, - pass: this.password, - sendImmediately: true - }; + options.auth = this.username + ':' + this.password; } var req = require(this.protocol).request(options, function(res) { @@ -87,4 +83,4 @@ Proxy.prototype.invoke = function(method, args, callback) { }; -module.exports = Proxy; \ No newline at end of file +module.exports = Proxy;