Skip to content

Commit

Permalink
Fix detection of URL schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
kirgene committed May 14, 2020
1 parent 8ff002d commit c4b3469
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit c4b3469

Please sign in to comment.