Skip to content
Browse files

Use https lib

consistent variable
  • Loading branch information...
1 parent d1d220a commit 5171981f048968412f9d027b2af97ceaf0bcecd3 @abhisekp abhisekp 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 5171981

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