Correct protocol detection
This commit is contained in:
parent
6b75d241fc
commit
7b7ccc2eef
|
@ -113,7 +113,7 @@ ProjectionsClient.prototype.delete = function(httpEndPoint, name, deleteEmittedS
|
||||||
|
|
||||||
ProjectionsClient.prototype.request = function(method, _url, data, userCredentials, expectedCode) {
|
ProjectionsClient.prototype.request = function(method, _url, data, userCredentials, expectedCode) {
|
||||||
const options = url.parse(_url);
|
const options = url.parse(_url);
|
||||||
const httplib = options.protocol === 'https' ? https : http;
|
const httplib = options.protocol === 'https:' ? https : http;
|
||||||
options.method = method;
|
options.method = method;
|
||||||
if (userCredentials) {
|
if (userCredentials) {
|
||||||
options.auth = [userCredentials.username, userCredentials.password].join(':');
|
options.auth = [userCredentials.username, userCredentials.password].join(':');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user