|
|
@@ -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