From c4b34697db30be4609b882e2abc917a9ee3607cd Mon Sep 17 00:00:00 2001 From: Yevhen Kyriukha Date: Thu, 14 May 2020 15:31:08 +0300 Subject: [PATCH] Fix detection of URL schema. --- src/lib/request.js | 2 +- src/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/request.js b/src/lib/request.js index f4e057dd..620e81d6 100644 --- a/src/lib/request.js +++ b/src/lib/request.js @@ -44,7 +44,7 @@ const request = async (opts) => { reqOpts.headers['content-length'] = Buffer.byteLength(opts.body); } - const adapter = (completeUrl.scheme === 'https:') ? https : http; + const adapter = (completeUrl.protocol === 'https:') ? https : http; return new Promise((resolve, reject) => { const req = adapter.request(reqOpts, (res) => { diff --git a/src/package.json b/src/package.json index 9e398158..49ec5a83 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "@mojaloop/sdk-standard-components", - "version": "10.2.0", + "version": "10.2.1", "description": "An set of standard components for connecting to Mojaloop API enabled switches", "main": "index.js", "scripts": {