Correct protocol detection

This commit is contained in:
Josh Wulf 2019-12-11 02:54:47 +10:00
parent 6b75d241fc
commit 7b7ccc2eef

View File

@ -113,7 +113,7 @@ ProjectionsClient.prototype.delete = function(httpEndPoint, name, deleteEmittedS
ProjectionsClient.prototype.request = function(method, _url, data, userCredentials, expectedCode) {
const options = url.parse(_url);
const httplib = options.protocol === 'https' ? https : http;
const httplib = options.protocol === 'https:' ? https : http;
options.method = method;
if (userCredentials) {
options.auth = [userCredentials.username, userCredentials.password].join(':');