@ekhein/http-request 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +11 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -71,6 +71,7 @@ class HttpRequest {
71
71
  /* Axios */
72
72
  this.instance = axios_1.default.create(Object.assign({}, Object.assign({
73
73
  ["headers"]: {},
74
+ ["timeout"]: 30e3,
74
75
  ["retryLimit"]: 3,
75
76
  }, options, {
76
77
  ["proxy"]: false,
@@ -238,13 +239,21 @@ class HttpRequest {
238
239
  post(url_1, data_1) {
239
240
  return __awaiter(this, arguments, void 0, function* (url, data, opts = {}) {
240
241
  return this.instance
241
- .request(Object.assign(Object.assign({}, opts), { method: "POST", serviceType: 1, url, data }));
242
+ .request(Object.assign({}, Object.assign({}, opts, { url, data }, {
243
+ ["method"]: "POST",
244
+ ["serviceType"]: 1,
245
+ ["baseURL"]: process.env.CORE_URL,
246
+ })));
242
247
  });
243
248
  }
244
249
  call(path_1, data_1) {
245
250
  return __awaiter(this, arguments, void 0, function* (path, data, opts = {}) {
246
251
  return this.instance
247
- .request(Object.assign(Object.assign({}, opts), { method: "POST", serviceType: 2, path, data }));
252
+ .request(Object.assign({}, Object.assign({}, opts, { path, data }, {
253
+ ["method"]: "POST",
254
+ ["serviceType"]: 2,
255
+ ["baseURL"]: process.env.SEKIRO_URL,
256
+ })));
248
257
  });
249
258
  }
250
259
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekhein/http-request",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "license": "MIT",
5
5
  "author": "ekhein",
6
6
  "main": "./dist/main.js",