@kontent-ai/core-sdk 10.1.1 → 10.2.0
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.
- package/dist/cjs/helpers/header.helper.d.ts +13 -13
- package/dist/cjs/helpers/header.helper.js +22 -22
- package/dist/cjs/helpers/headers-helper.d.ts +3 -3
- package/dist/cjs/helpers/headers-helper.js +14 -14
- package/dist/cjs/helpers/index.d.ts +4 -5
- package/dist/cjs/helpers/index.js +20 -21
- package/dist/cjs/helpers/index.js.map +1 -1
- package/dist/cjs/helpers/retry-helper.d.ts +37 -37
- package/dist/cjs/helpers/retry-helper.js +148 -148
- package/dist/cjs/helpers/url.helper.d.ts +10 -10
- package/dist/cjs/helpers/url.helper.js +26 -26
- package/dist/cjs/http/http.debugger.d.ts +6 -6
- package/dist/cjs/http/http.debugger.js +22 -22
- package/dist/cjs/http/http.functions.d.ts +11 -11
- package/dist/cjs/http/http.functions.js +260 -260
- package/dist/cjs/http/http.models.d.ts +73 -73
- package/dist/cjs/http/http.models.js +2 -2
- package/dist/cjs/http/http.service.d.ts +19 -19
- package/dist/cjs/http/http.service.js +56 -56
- package/dist/cjs/http/ihttp.service.d.ts +9 -9
- package/dist/cjs/http/ihttp.service.js +2 -2
- package/dist/cjs/http/index.d.ts +6 -6
- package/dist/cjs/http/index.js +22 -22
- package/dist/cjs/http/test-http.service.d.ts +17 -17
- package/dist/cjs/http/test-http.service.js +44 -44
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +20 -20
- package/dist/cjs/models/index.d.ts +3 -3
- package/dist/cjs/models/index.js +19 -19
- package/dist/cjs/models/isdk-info.d.ts +14 -14
- package/dist/cjs/models/isdk-info.js +2 -2
- package/dist/cjs/models/parameters.d.ts +16 -16
- package/dist/cjs/models/parameters.js +28 -28
- package/dist/cjs/models/parameters.js.map +1 -1
- package/dist/cjs/models/url.models.d.ts +3 -3
- package/dist/cjs/models/url.models.js +2 -2
- package/dist/cjs/sdk-info.generated.d.ts +2 -2
- package/dist/cjs/sdk-info.generated.js +8 -8
- package/dist/es6/helpers/header.helper.d.ts +13 -13
- package/dist/es6/helpers/header.helper.js +18 -18
- package/dist/es6/helpers/headers-helper.d.ts +3 -3
- package/dist/es6/helpers/headers-helper.js +10 -10
- package/dist/es6/helpers/index.d.ts +4 -5
- package/dist/es6/helpers/index.js +4 -5
- package/dist/es6/helpers/index.js.map +1 -1
- package/dist/es6/helpers/retry-helper.d.ts +37 -37
- package/dist/es6/helpers/retry-helper.js +144 -144
- package/dist/es6/helpers/url.helper.d.ts +10 -10
- package/dist/es6/helpers/url.helper.js +22 -22
- package/dist/es6/http/http.debugger.d.ts +6 -6
- package/dist/es6/http/http.debugger.js +18 -18
- package/dist/es6/http/http.functions.d.ts +11 -11
- package/dist/es6/http/http.functions.js +251 -251
- package/dist/es6/http/http.models.d.ts +73 -73
- package/dist/es6/http/http.models.js +1 -1
- package/dist/es6/http/http.service.d.ts +19 -19
- package/dist/es6/http/http.service.js +52 -52
- package/dist/es6/http/ihttp.service.d.ts +9 -9
- package/dist/es6/http/ihttp.service.js +1 -1
- package/dist/es6/http/index.d.ts +6 -6
- package/dist/es6/http/index.js +6 -6
- package/dist/es6/http/test-http.service.d.ts +17 -17
- package/dist/es6/http/test-http.service.js +40 -40
- package/dist/es6/index.d.ts +3 -3
- package/dist/es6/index.js +4 -4
- package/dist/es6/models/index.d.ts +3 -3
- package/dist/es6/models/index.js +3 -3
- package/dist/es6/models/isdk-info.d.ts +14 -14
- package/dist/es6/models/isdk-info.js +1 -1
- package/dist/es6/models/parameters.d.ts +16 -16
- package/dist/es6/models/parameters.js +25 -25
- package/dist/es6/models/url.models.d.ts +3 -3
- package/dist/es6/models/url.models.js +1 -1
- package/dist/es6/sdk-info.generated.d.ts +2 -2
- package/dist/es6/sdk-info.generated.js +5 -5
- package/dist/esnext/helpers/header.helper.d.ts +13 -13
- package/dist/esnext/helpers/header.helper.js +18 -18
- package/dist/esnext/helpers/headers-helper.d.ts +3 -3
- package/dist/esnext/helpers/headers-helper.js +10 -10
- package/dist/esnext/helpers/index.d.ts +4 -5
- package/dist/esnext/helpers/index.js +4 -5
- package/dist/esnext/helpers/index.js.map +1 -1
- package/dist/esnext/helpers/retry-helper.d.ts +37 -37
- package/dist/esnext/helpers/retry-helper.js +144 -144
- package/dist/esnext/helpers/url.helper.d.ts +10 -10
- package/dist/esnext/helpers/url.helper.js +22 -22
- package/dist/esnext/http/http.debugger.d.ts +6 -6
- package/dist/esnext/http/http.debugger.js +18 -18
- package/dist/esnext/http/http.functions.d.ts +11 -11
- package/dist/esnext/http/http.functions.js +251 -251
- package/dist/esnext/http/http.models.d.ts +73 -73
- package/dist/esnext/http/http.models.js +1 -1
- package/dist/esnext/http/http.service.d.ts +19 -19
- package/dist/esnext/http/http.service.js +52 -52
- package/dist/esnext/http/ihttp.service.d.ts +9 -9
- package/dist/esnext/http/ihttp.service.js +1 -1
- package/dist/esnext/http/index.d.ts +6 -6
- package/dist/esnext/http/index.js +6 -6
- package/dist/esnext/http/test-http.service.d.ts +17 -17
- package/dist/esnext/http/test-http.service.js +40 -40
- package/dist/esnext/index.d.ts +3 -3
- package/dist/esnext/index.js +4 -4
- package/dist/esnext/models/index.d.ts +3 -3
- package/dist/esnext/models/index.js +3 -3
- package/dist/esnext/models/isdk-info.d.ts +14 -14
- package/dist/esnext/models/isdk-info.js +1 -1
- package/dist/esnext/models/parameters.d.ts +16 -16
- package/dist/esnext/models/parameters.js +25 -25
- package/dist/esnext/models/url.models.d.ts +3 -3
- package/dist/esnext/models/url.models.js +1 -1
- package/dist/esnext/sdk-info.generated.d.ts +2 -2
- package/dist/esnext/sdk-info.generated.js +5 -5
- package/dist/umd/kontent-core.umd.js +3431 -2740
- package/dist/umd/kontent-core.umd.js.map +1 -1
- package/dist/umd/kontent-core.umd.min.js +1 -1
- package/dist/umd/kontent-core.umd.min.js.map +1 -1
- package/dist/umd/report.json +1 -1
- package/dist/umd/report.min.json +1 -1
- package/dist/umd/stats.json +1185 -8545
- package/dist/umd/stats.min.json +1192 -8684
- package/lib/helpers/index.ts +0 -1
- package/lib/sdk-info.generated.ts +1 -1
- package/package.json +26 -25
- package/dist/cjs/helpers/enum.helper.d.ts +0 -8
- package/dist/cjs/helpers/enum.helper.js +0 -54
- package/dist/cjs/helpers/enum.helper.js.map +0 -1
- package/dist/es6/helpers/enum.helper.d.ts +0 -8
- package/dist/es6/helpers/enum.helper.js +0 -50
- package/dist/es6/helpers/enum.helper.js.map +0 -1
- package/dist/esnext/helpers/enum.helper.d.ts +0 -8
- package/dist/esnext/helpers/enum.helper.js +0 -50
- package/dist/esnext/helpers/enum.helper.js.map +0 -1
- package/lib/helpers/enum.helper.ts +0 -63
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.httpDebugger = exports.HttpDebugger = void 0;
|
|
4
|
-
class HttpDebugger {
|
|
5
|
-
/*
|
|
6
|
-
Called when http request is started
|
|
7
|
-
*/
|
|
8
|
-
debugStartHttpRequest() {
|
|
9
|
-
}
|
|
10
|
-
/*
|
|
11
|
-
Called when http request is resolved
|
|
12
|
-
*/
|
|
13
|
-
debugSuccessHttpRequest() {
|
|
14
|
-
}
|
|
15
|
-
/*
|
|
16
|
-
Called when http request is being retried
|
|
17
|
-
*/
|
|
18
|
-
debugRetryHttpRequest() {
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.HttpDebugger = HttpDebugger;
|
|
22
|
-
exports.httpDebugger = new HttpDebugger();
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.httpDebugger = exports.HttpDebugger = void 0;
|
|
4
|
+
class HttpDebugger {
|
|
5
|
+
/*
|
|
6
|
+
Called when http request is started
|
|
7
|
+
*/
|
|
8
|
+
debugStartHttpRequest() {
|
|
9
|
+
}
|
|
10
|
+
/*
|
|
11
|
+
Called when http request is resolved
|
|
12
|
+
*/
|
|
13
|
+
debugSuccessHttpRequest() {
|
|
14
|
+
}
|
|
15
|
+
/*
|
|
16
|
+
Called when http request is being retried
|
|
17
|
+
*/
|
|
18
|
+
debugRetryHttpRequest() {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.HttpDebugger = HttpDebugger;
|
|
22
|
+
exports.httpDebugger = new HttpDebugger();
|
|
23
23
|
//# sourceMappingURL=http.debugger.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AxiosInstance, CancelToken } from 'axios';
|
|
2
|
-
import { IHttpCancelRequestToken, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IResponse } from './http.models';
|
|
3
|
-
export interface IHttpFunctionsConfig {
|
|
4
|
-
logErrorsToConsole: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function getWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpGetQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
7
|
-
export declare function postWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpPostQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
8
|
-
export declare function putWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpPutQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
9
|
-
export declare function patchWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpPatchQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
10
|
-
export declare function deleteWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpDeleteQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
11
|
-
export declare function createCancelToken(): IHttpCancelRequestToken<CancelToken>;
|
|
1
|
+
import { AxiosInstance, CancelToken } from 'axios';
|
|
2
|
+
import { IHttpCancelRequestToken, IHttpDeleteQueryCall, IHttpGetQueryCall, IHttpPatchQueryCall, IHttpPostQueryCall, IHttpPutQueryCall, IHttpQueryOptions, IResponse } from './http.models';
|
|
3
|
+
export interface IHttpFunctionsConfig {
|
|
4
|
+
logErrorsToConsole: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function getWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpGetQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
7
|
+
export declare function postWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpPostQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
8
|
+
export declare function putWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpPutQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
9
|
+
export declare function patchWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpPatchQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
10
|
+
export declare function deleteWithRetryAsync<TRawData>(instance: AxiosInstance, call: IHttpDeleteQueryCall, functionsConfig: IHttpFunctionsConfig, options?: IHttpQueryOptions<CancelToken>): Promise<IResponse<TRawData>>;
|
|
11
|
+
export declare function createCancelToken(): IHttpCancelRequestToken<CancelToken>;
|
|
@@ -1,261 +1,261 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createCancelToken = exports.deleteWithRetryAsync = exports.patchWithRetryAsync = exports.putWithRetryAsync = exports.postWithRetryAsync = exports.getWithRetryAsync = void 0;
|
|
13
|
-
const axios_1 = require("axios");
|
|
14
|
-
const headers_helper_1 = require("../helpers/headers-helper");
|
|
15
|
-
const http_debugger_1 = require("./http.debugger");
|
|
16
|
-
const retry_helper_1 = require("../helpers/retry-helper");
|
|
17
|
-
function getWithRetryAsync(instance, call, functionsConfig, options) {
|
|
18
|
-
var _a;
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
21
|
-
return yield runWithRetryAsync({
|
|
22
|
-
retryAttempt: 0,
|
|
23
|
-
url: call.url,
|
|
24
|
-
retryStrategy: retryStrategyOptions,
|
|
25
|
-
functionsConfig: functionsConfig,
|
|
26
|
-
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
var _b, _c;
|
|
28
|
-
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
29
|
-
const axiosResponse = yield instance.get(call.url, {
|
|
30
|
-
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
31
|
-
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
32
|
-
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
33
|
-
});
|
|
34
|
-
const response = {
|
|
35
|
-
data: axiosResponse.data,
|
|
36
|
-
rawResponse: axiosResponse,
|
|
37
|
-
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
38
|
-
status: axiosResponse.status,
|
|
39
|
-
retryStrategy: {
|
|
40
|
-
options: retryStrategyOptions,
|
|
41
|
-
retryAttempts: retryAttempt
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
45
|
-
return response;
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
exports.getWithRetryAsync = getWithRetryAsync;
|
|
51
|
-
function postWithRetryAsync(instance, call, functionsConfig, options) {
|
|
52
|
-
var _a;
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
55
|
-
return yield runWithRetryAsync({
|
|
56
|
-
retryAttempt: 0,
|
|
57
|
-
url: call.url,
|
|
58
|
-
retryStrategy: retryStrategyOptions,
|
|
59
|
-
functionsConfig: functionsConfig,
|
|
60
|
-
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
var _b, _c;
|
|
62
|
-
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
63
|
-
const axiosResponse = yield instance.post(call.url, call.body, {
|
|
64
|
-
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
65
|
-
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
66
|
-
// required for uploading large files
|
|
67
|
-
// https://github.com/axios/axios/issues/1362
|
|
68
|
-
maxContentLength: 'Infinity',
|
|
69
|
-
maxBodyLength: 'Infinity',
|
|
70
|
-
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
71
|
-
});
|
|
72
|
-
const response = {
|
|
73
|
-
data: axiosResponse.data,
|
|
74
|
-
rawResponse: axiosResponse,
|
|
75
|
-
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
76
|
-
status: axiosResponse.status,
|
|
77
|
-
retryStrategy: {
|
|
78
|
-
options: retryStrategyOptions,
|
|
79
|
-
retryAttempts: retryAttempt
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
83
|
-
return response;
|
|
84
|
-
})
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
exports.postWithRetryAsync = postWithRetryAsync;
|
|
89
|
-
function putWithRetryAsync(instance, call, functionsConfig, options) {
|
|
90
|
-
var _a;
|
|
91
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
93
|
-
return yield runWithRetryAsync({
|
|
94
|
-
retryAttempt: 0,
|
|
95
|
-
url: call.url,
|
|
96
|
-
retryStrategy: retryStrategyOptions,
|
|
97
|
-
functionsConfig: functionsConfig,
|
|
98
|
-
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
var _b, _c;
|
|
100
|
-
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
101
|
-
const axiosResponse = yield instance.put(call.url, call.body, {
|
|
102
|
-
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
103
|
-
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
104
|
-
// required for uploading large files
|
|
105
|
-
// https://github.com/axios/axios/issues/1362
|
|
106
|
-
maxContentLength: 'Infinity',
|
|
107
|
-
maxBodyLength: 'Infinity',
|
|
108
|
-
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
109
|
-
});
|
|
110
|
-
const response = {
|
|
111
|
-
data: axiosResponse.data,
|
|
112
|
-
rawResponse: axiosResponse,
|
|
113
|
-
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
114
|
-
status: axiosResponse.status,
|
|
115
|
-
retryStrategy: {
|
|
116
|
-
options: retryStrategyOptions,
|
|
117
|
-
retryAttempts: retryAttempt
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
121
|
-
return response;
|
|
122
|
-
})
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
exports.putWithRetryAsync = putWithRetryAsync;
|
|
127
|
-
function patchWithRetryAsync(instance, call, functionsConfig, options) {
|
|
128
|
-
var _a;
|
|
129
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
131
|
-
return yield runWithRetryAsync({
|
|
132
|
-
retryAttempt: 0,
|
|
133
|
-
url: call.url,
|
|
134
|
-
retryStrategy: retryStrategyOptions,
|
|
135
|
-
functionsConfig: functionsConfig,
|
|
136
|
-
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
var _b, _c;
|
|
138
|
-
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
139
|
-
const axiosResponse = yield instance.patch(call.url, call.body, {
|
|
140
|
-
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
141
|
-
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
142
|
-
// required for uploading large files
|
|
143
|
-
// https://github.com/axios/axios/issues/1362
|
|
144
|
-
maxContentLength: 'Infinity',
|
|
145
|
-
maxBodyLength: 'Infinity',
|
|
146
|
-
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
147
|
-
});
|
|
148
|
-
const response = {
|
|
149
|
-
data: axiosResponse.data,
|
|
150
|
-
rawResponse: axiosResponse,
|
|
151
|
-
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
152
|
-
status: axiosResponse.status,
|
|
153
|
-
retryStrategy: {
|
|
154
|
-
options: retryStrategyOptions,
|
|
155
|
-
retryAttempts: retryAttempt
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
159
|
-
return response;
|
|
160
|
-
})
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
exports.patchWithRetryAsync = patchWithRetryAsync;
|
|
165
|
-
function deleteWithRetryAsync(instance, call, functionsConfig, options) {
|
|
166
|
-
var _a;
|
|
167
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
169
|
-
return yield runWithRetryAsync({
|
|
170
|
-
retryAttempt: 0,
|
|
171
|
-
url: call.url,
|
|
172
|
-
retryStrategy: retryStrategyOptions,
|
|
173
|
-
functionsConfig: functionsConfig,
|
|
174
|
-
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
-
var _b, _c;
|
|
176
|
-
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
177
|
-
const axiosResponse = yield instance.delete(call.url, {
|
|
178
|
-
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
179
|
-
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
180
|
-
// required for uploading large files
|
|
181
|
-
// https://github.com/axios/axios/issues/1362
|
|
182
|
-
maxContentLength: 'Infinity',
|
|
183
|
-
maxBodyLength: 'Infinity',
|
|
184
|
-
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
185
|
-
});
|
|
186
|
-
const response = {
|
|
187
|
-
data: axiosResponse.data,
|
|
188
|
-
rawResponse: axiosResponse,
|
|
189
|
-
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
190
|
-
status: axiosResponse.status,
|
|
191
|
-
retryStrategy: {
|
|
192
|
-
options: retryStrategyOptions,
|
|
193
|
-
retryAttempts: retryAttempt
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
197
|
-
return response;
|
|
198
|
-
})
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
exports.deleteWithRetryAsync = deleteWithRetryAsync;
|
|
203
|
-
function createCancelToken() {
|
|
204
|
-
let canceler;
|
|
205
|
-
const token = new axios_1.default.CancelToken((c) => {
|
|
206
|
-
// An executor function receives a cancel function as a parameter
|
|
207
|
-
canceler = c;
|
|
208
|
-
});
|
|
209
|
-
return {
|
|
210
|
-
cancel: (cancelMessage) => canceler(`${retry_helper_1.retryHelper.requestCancelledMessagePrefix}: ${cancelMessage !== null && cancelMessage !== void 0 ? cancelMessage : 'User cancel'}`),
|
|
211
|
-
token: token
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
exports.createCancelToken = createCancelToken;
|
|
215
|
-
function runWithRetryAsync(data) {
|
|
216
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
-
try {
|
|
218
|
-
return yield data.call(data.retryAttempt);
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
const retryResult = retry_helper_1.retryHelper.getRetryErrorResult({
|
|
222
|
-
error: error,
|
|
223
|
-
retryAttempt: data.retryAttempt,
|
|
224
|
-
retryStrategy: data.retryStrategy
|
|
225
|
-
});
|
|
226
|
-
if (retryResult.canRetry) {
|
|
227
|
-
http_debugger_1.httpDebugger.debugRetryHttpRequest();
|
|
228
|
-
// wait time before retrying
|
|
229
|
-
yield new Promise((resolve) => setTimeout(resolve, retryResult.retryInMs));
|
|
230
|
-
// retry request
|
|
231
|
-
console.warn(`Retry attempt '${data.retryAttempt + 1}' from a maximum of '${retryResult.maxRetries}' retries. Request url: '${data.url}'`);
|
|
232
|
-
return yield runWithRetryAsync({
|
|
233
|
-
call: data.call,
|
|
234
|
-
retryStrategy: data.retryStrategy,
|
|
235
|
-
retryAttempt: data.retryAttempt + 1,
|
|
236
|
-
url: data.url,
|
|
237
|
-
functionsConfig: data.functionsConfig
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
if (data.functionsConfig.logErrorsToConsole) {
|
|
241
|
-
console.error(`Executing '${data.url}' failed. Request was retried '${data.retryAttempt}' times. `, error);
|
|
242
|
-
}
|
|
243
|
-
throw error;
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
function getHeadersJson(headers, addContentTypeHeader) {
|
|
248
|
-
const headerJson = {};
|
|
249
|
-
headers.forEach((header) => {
|
|
250
|
-
headerJson[header.header] = header.value;
|
|
251
|
-
});
|
|
252
|
-
if (addContentTypeHeader) {
|
|
253
|
-
// add default content type header if not present
|
|
254
|
-
const contentTypeHeader = headers.find((m) => m.header.toLowerCase() === 'Content-Type'.toLowerCase());
|
|
255
|
-
if (!contentTypeHeader) {
|
|
256
|
-
headerJson['Content-Type'] = 'application/json';
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
return headerJson;
|
|
260
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createCancelToken = exports.deleteWithRetryAsync = exports.patchWithRetryAsync = exports.putWithRetryAsync = exports.postWithRetryAsync = exports.getWithRetryAsync = void 0;
|
|
13
|
+
const axios_1 = require("axios");
|
|
14
|
+
const headers_helper_1 = require("../helpers/headers-helper");
|
|
15
|
+
const http_debugger_1 = require("./http.debugger");
|
|
16
|
+
const retry_helper_1 = require("../helpers/retry-helper");
|
|
17
|
+
function getWithRetryAsync(instance, call, functionsConfig, options) {
|
|
18
|
+
var _a;
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
21
|
+
return yield runWithRetryAsync({
|
|
22
|
+
retryAttempt: 0,
|
|
23
|
+
url: call.url,
|
|
24
|
+
retryStrategy: retryStrategyOptions,
|
|
25
|
+
functionsConfig: functionsConfig,
|
|
26
|
+
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
var _b, _c;
|
|
28
|
+
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
29
|
+
const axiosResponse = yield instance.get(call.url, {
|
|
30
|
+
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
31
|
+
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
32
|
+
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
33
|
+
});
|
|
34
|
+
const response = {
|
|
35
|
+
data: axiosResponse.data,
|
|
36
|
+
rawResponse: axiosResponse,
|
|
37
|
+
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
38
|
+
status: axiosResponse.status,
|
|
39
|
+
retryStrategy: {
|
|
40
|
+
options: retryStrategyOptions,
|
|
41
|
+
retryAttempts: retryAttempt
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
45
|
+
return response;
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
exports.getWithRetryAsync = getWithRetryAsync;
|
|
51
|
+
function postWithRetryAsync(instance, call, functionsConfig, options) {
|
|
52
|
+
var _a;
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
55
|
+
return yield runWithRetryAsync({
|
|
56
|
+
retryAttempt: 0,
|
|
57
|
+
url: call.url,
|
|
58
|
+
retryStrategy: retryStrategyOptions,
|
|
59
|
+
functionsConfig: functionsConfig,
|
|
60
|
+
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
var _b, _c;
|
|
62
|
+
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
63
|
+
const axiosResponse = yield instance.post(call.url, call.body, {
|
|
64
|
+
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
65
|
+
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
66
|
+
// required for uploading large files
|
|
67
|
+
// https://github.com/axios/axios/issues/1362
|
|
68
|
+
maxContentLength: 'Infinity',
|
|
69
|
+
maxBodyLength: 'Infinity',
|
|
70
|
+
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
71
|
+
});
|
|
72
|
+
const response = {
|
|
73
|
+
data: axiosResponse.data,
|
|
74
|
+
rawResponse: axiosResponse,
|
|
75
|
+
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
76
|
+
status: axiosResponse.status,
|
|
77
|
+
retryStrategy: {
|
|
78
|
+
options: retryStrategyOptions,
|
|
79
|
+
retryAttempts: retryAttempt
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
83
|
+
return response;
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
exports.postWithRetryAsync = postWithRetryAsync;
|
|
89
|
+
function putWithRetryAsync(instance, call, functionsConfig, options) {
|
|
90
|
+
var _a;
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
93
|
+
return yield runWithRetryAsync({
|
|
94
|
+
retryAttempt: 0,
|
|
95
|
+
url: call.url,
|
|
96
|
+
retryStrategy: retryStrategyOptions,
|
|
97
|
+
functionsConfig: functionsConfig,
|
|
98
|
+
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
var _b, _c;
|
|
100
|
+
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
101
|
+
const axiosResponse = yield instance.put(call.url, call.body, {
|
|
102
|
+
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
103
|
+
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
104
|
+
// required for uploading large files
|
|
105
|
+
// https://github.com/axios/axios/issues/1362
|
|
106
|
+
maxContentLength: 'Infinity',
|
|
107
|
+
maxBodyLength: 'Infinity',
|
|
108
|
+
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
109
|
+
});
|
|
110
|
+
const response = {
|
|
111
|
+
data: axiosResponse.data,
|
|
112
|
+
rawResponse: axiosResponse,
|
|
113
|
+
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
114
|
+
status: axiosResponse.status,
|
|
115
|
+
retryStrategy: {
|
|
116
|
+
options: retryStrategyOptions,
|
|
117
|
+
retryAttempts: retryAttempt
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
121
|
+
return response;
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
exports.putWithRetryAsync = putWithRetryAsync;
|
|
127
|
+
function patchWithRetryAsync(instance, call, functionsConfig, options) {
|
|
128
|
+
var _a;
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
131
|
+
return yield runWithRetryAsync({
|
|
132
|
+
retryAttempt: 0,
|
|
133
|
+
url: call.url,
|
|
134
|
+
retryStrategy: retryStrategyOptions,
|
|
135
|
+
functionsConfig: functionsConfig,
|
|
136
|
+
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
var _b, _c;
|
|
138
|
+
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
139
|
+
const axiosResponse = yield instance.patch(call.url, call.body, {
|
|
140
|
+
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
141
|
+
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
142
|
+
// required for uploading large files
|
|
143
|
+
// https://github.com/axios/axios/issues/1362
|
|
144
|
+
maxContentLength: 'Infinity',
|
|
145
|
+
maxBodyLength: 'Infinity',
|
|
146
|
+
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
147
|
+
});
|
|
148
|
+
const response = {
|
|
149
|
+
data: axiosResponse.data,
|
|
150
|
+
rawResponse: axiosResponse,
|
|
151
|
+
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
152
|
+
status: axiosResponse.status,
|
|
153
|
+
retryStrategy: {
|
|
154
|
+
options: retryStrategyOptions,
|
|
155
|
+
retryAttempts: retryAttempt
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
159
|
+
return response;
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
exports.patchWithRetryAsync = patchWithRetryAsync;
|
|
165
|
+
function deleteWithRetryAsync(instance, call, functionsConfig, options) {
|
|
166
|
+
var _a;
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
const retryStrategyOptions = (_a = options === null || options === void 0 ? void 0 : options.retryStrategy) !== null && _a !== void 0 ? _a : retry_helper_1.retryHelper.defaultRetryStrategy;
|
|
169
|
+
return yield runWithRetryAsync({
|
|
170
|
+
retryAttempt: 0,
|
|
171
|
+
url: call.url,
|
|
172
|
+
retryStrategy: retryStrategyOptions,
|
|
173
|
+
functionsConfig: functionsConfig,
|
|
174
|
+
call: (retryAttempt) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
var _b, _c;
|
|
176
|
+
http_debugger_1.httpDebugger.debugStartHttpRequest();
|
|
177
|
+
const axiosResponse = yield instance.delete(call.url, {
|
|
178
|
+
headers: getHeadersJson((_b = options === null || options === void 0 ? void 0 : options.headers) !== null && _b !== void 0 ? _b : [], false),
|
|
179
|
+
responseType: options === null || options === void 0 ? void 0 : options.responseType,
|
|
180
|
+
// required for uploading large files
|
|
181
|
+
// https://github.com/axios/axios/issues/1362
|
|
182
|
+
maxContentLength: 'Infinity',
|
|
183
|
+
maxBodyLength: 'Infinity',
|
|
184
|
+
cancelToken: (_c = options === null || options === void 0 ? void 0 : options.cancelToken) === null || _c === void 0 ? void 0 : _c.token
|
|
185
|
+
});
|
|
186
|
+
const response = {
|
|
187
|
+
data: axiosResponse.data,
|
|
188
|
+
rawResponse: axiosResponse,
|
|
189
|
+
headers: (0, headers_helper_1.extractHeadersFromAxiosResponse)(axiosResponse),
|
|
190
|
+
status: axiosResponse.status,
|
|
191
|
+
retryStrategy: {
|
|
192
|
+
options: retryStrategyOptions,
|
|
193
|
+
retryAttempts: retryAttempt
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
http_debugger_1.httpDebugger.debugSuccessHttpRequest();
|
|
197
|
+
return response;
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
exports.deleteWithRetryAsync = deleteWithRetryAsync;
|
|
203
|
+
function createCancelToken() {
|
|
204
|
+
let canceler;
|
|
205
|
+
const token = new axios_1.default.CancelToken((c) => {
|
|
206
|
+
// An executor function receives a cancel function as a parameter
|
|
207
|
+
canceler = c;
|
|
208
|
+
});
|
|
209
|
+
return {
|
|
210
|
+
cancel: (cancelMessage) => canceler(`${retry_helper_1.retryHelper.requestCancelledMessagePrefix}: ${cancelMessage !== null && cancelMessage !== void 0 ? cancelMessage : 'User cancel'}`),
|
|
211
|
+
token: token
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
exports.createCancelToken = createCancelToken;
|
|
215
|
+
function runWithRetryAsync(data) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
+
try {
|
|
218
|
+
return yield data.call(data.retryAttempt);
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
const retryResult = retry_helper_1.retryHelper.getRetryErrorResult({
|
|
222
|
+
error: error,
|
|
223
|
+
retryAttempt: data.retryAttempt,
|
|
224
|
+
retryStrategy: data.retryStrategy
|
|
225
|
+
});
|
|
226
|
+
if (retryResult.canRetry) {
|
|
227
|
+
http_debugger_1.httpDebugger.debugRetryHttpRequest();
|
|
228
|
+
// wait time before retrying
|
|
229
|
+
yield new Promise((resolve) => setTimeout(resolve, retryResult.retryInMs));
|
|
230
|
+
// retry request
|
|
231
|
+
console.warn(`Retry attempt '${data.retryAttempt + 1}' from a maximum of '${retryResult.maxRetries}' retries. Request url: '${data.url}'`);
|
|
232
|
+
return yield runWithRetryAsync({
|
|
233
|
+
call: data.call,
|
|
234
|
+
retryStrategy: data.retryStrategy,
|
|
235
|
+
retryAttempt: data.retryAttempt + 1,
|
|
236
|
+
url: data.url,
|
|
237
|
+
functionsConfig: data.functionsConfig
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
if (data.functionsConfig.logErrorsToConsole) {
|
|
241
|
+
console.error(`Executing '${data.url}' failed. Request was retried '${data.retryAttempt}' times. `, error);
|
|
242
|
+
}
|
|
243
|
+
throw error;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function getHeadersJson(headers, addContentTypeHeader) {
|
|
248
|
+
const headerJson = {};
|
|
249
|
+
headers.forEach((header) => {
|
|
250
|
+
headerJson[header.header] = header.value;
|
|
251
|
+
});
|
|
252
|
+
if (addContentTypeHeader) {
|
|
253
|
+
// add default content type header if not present
|
|
254
|
+
const contentTypeHeader = headers.find((m) => m.header.toLowerCase() === 'Content-Type'.toLowerCase());
|
|
255
|
+
if (!contentTypeHeader) {
|
|
256
|
+
headerJson['Content-Type'] = 'application/json';
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return headerJson;
|
|
260
|
+
}
|
|
261
261
|
//# sourceMappingURL=http.functions.js.map
|