@minimaltech/node-infra 0.5.8-4 → 0.5.8-5
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.
@@ -7,7 +7,6 @@ export interface IAxiosRequestOptions extends AxiosRequestConfig {
|
|
7
7
|
params?: AnyObject;
|
8
8
|
body?: AnyObject;
|
9
9
|
headers?: AnyObject;
|
10
|
-
configs?: AnyObject;
|
11
10
|
}
|
12
11
|
export declare class AxiosFetcher extends AbstractNetworkFetchableHelper<IAxiosRequestOptions, axios.AxiosResponse> {
|
13
12
|
private worker;
|
@@ -1,4 +1,15 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
3
|
+
var t = {};
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
5
|
+
t[p] = s[p];
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
9
|
+
t[p[i]] = s[p[i]];
|
10
|
+
}
|
11
|
+
return t;
|
12
|
+
};
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
15
|
};
|
@@ -21,12 +32,12 @@ class AxiosFetcher extends base_fetcher_1.AbstractNetworkFetchableHelper {
|
|
21
32
|
// SEND REQUEST
|
22
33
|
// -------------------------------------------------------------
|
23
34
|
send(opts, logger) {
|
24
|
-
const { url, method = 'get', params = {}, body: data, headers
|
35
|
+
const { url, method = 'get', params = {}, body: data, headers } = opts, rest = __rest(opts, ["url", "method", "params", "body", "headers"]);
|
25
36
|
const props = Object.assign({ url,
|
26
37
|
method,
|
27
38
|
params,
|
28
39
|
data,
|
29
|
-
headers, paramsSerializer: { serialize: p => (0, url_utility_1.stringify)(p) } },
|
40
|
+
headers, paramsSerializer: { serialize: p => (0, url_utility_1.stringify)(p) } }, rest);
|
30
41
|
const protocol = this.getProtocol(url);
|
31
42
|
if (protocol === 'https') {
|
32
43
|
props.httpsAgent = new node_https_1.default.Agent({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"axios-fetcher.js","sourceRoot":"","sources":["../../../../../src/helpers/network/http-request/fetcher/axios-fetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"axios-fetcher.js","sourceRoot":"","sources":["../../../../../src/helpers/network/http-request/fetcher/axios-fetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,yDAAoD;AACpD,kDAAiE;AACjE,4DAA+B;AAC/B,iDAAgE;AAUhE,gEAAgE;AAChE,MAAa,YAAa,SAAQ,6CAGjC;IAGC,YAAY,IAAwE;;QAClF,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3B,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;QAChC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,0CAAE,IAAI,CAAC,wDAAwD,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAExF,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,mBAAM,cAAc,EAAG,CAAC;IACpD,CAAC;IAED,gEAAgE;IAChE,eAAe;IACf,gEAAgE;IAChE,IAAI,CAAU,IAA+C,EAAE,MAAY;QACzE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,KAAc,IAAI,EAAb,IAAI,UAAK,IAAI,EAAzE,8CAAkE,CAAO,CAAC;QAChF,MAAM,KAAK,mBACT,GAAG;YACH,MAAM;YACN,MAAM;YACN,IAAI;YACJ,OAAO,EACP,gBAAgB,EAAE,EAAE,SAAS,EAAE,CAAC,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