diff --git a/maxctrl/lib/common.js b/maxctrl/lib/common.js index 99615833d..ce7459075 100644 --- a/maxctrl/lib/common.js +++ b/maxctrl/lib/common.js @@ -316,7 +316,7 @@ module.exports = function() { base = 'https://' } - return base + argv.u + ':' + argv.p + '@' + host + '/v1/' + endpoint + return base + host + '/v1/' + endpoint } @@ -358,6 +358,7 @@ module.exports = function() { this.doAsyncRequest = function(host, resource, cb, obj) { args = obj || {} args.uri = getUri(host, this.argv.secure, resource) + args.auth = {user: argv.u, pass: argv.p} args.json = true args.timeout = this.argv.timeout setTlsCerts(args)