Skip to content
Browse files

Merge pull request #69 from abhisekp/fix/use-https

Quick Patch - Use https lib
  • Loading branch information...
2 parents d1d220a + 5171981 commit e9f20ed01caf1315db5aa2363990c84371c6abf1 @BerkeleyTrue BerkeleyTrue committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/utils/HttpWrap.js
View
5 lib/utils/HttpWrap.js
@@ -1,6 +1,6 @@
'use strict';
-const http = require('http'),
+const https = require('https'),
_ = require('lodash'),
AppConfig = require('../../config/AppConfig'),
Utils = require('./Utils');
@@ -8,6 +8,7 @@ const http = require('http'),
const HttpWrap = {
defaultOptions: {
host: AppConfig.apiServer,
+ port: 443,
timeout: 5000,
debug: false,
headers: {
@@ -48,7 +49,7 @@ const HttpWrap = {
Utils.error('HttpWrap', 'timeout', err);
};
- const request = http.request(this.defaultOptions, handleResponse);
+ const request = https.request(this.defaultOptions, handleResponse);
request.setTimeout(3000, handleTimeout);
request.end();
}

0 comments on commit e9f20ed

Please sign in to comment.
Something went wrong with that request. Please try again.