unprint 0.15.1 → 0.15.3
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/package.json +1 -1
- package/src/app.js +4 -1
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -1015,6 +1015,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
1015
1015
|
const { limiter, interval, concurrency } = getLimiter(url, options);
|
|
1016
1016
|
|
|
1017
1017
|
const instance = axios.create({
|
|
1018
|
+
method,
|
|
1018
1019
|
data: body,
|
|
1019
1020
|
validateStatus: null,
|
|
1020
1021
|
headers: options.headers,
|
|
@@ -1037,7 +1038,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
1037
1038
|
|
|
1038
1039
|
events.emit('requestInit', feedbackBase);
|
|
1039
1040
|
|
|
1040
|
-
const res = await limiter.schedule(async () => instance.
|
|
1041
|
+
const res = await limiter.schedule(async () => instance.request(url));
|
|
1041
1042
|
|
|
1042
1043
|
if (!(res.status >= 200 && res.status < 300)) {
|
|
1043
1044
|
handleError(new Error(`HTTP response from ${url} not OK (${res.status} ${res.statusText}): ${res.data}`), 'HTTP_NOT_OK');
|
|
@@ -1052,6 +1053,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
1052
1053
|
ok: false,
|
|
1053
1054
|
status: res.status,
|
|
1054
1055
|
statusText: res.statusText,
|
|
1056
|
+
headers: res.headers,
|
|
1055
1057
|
response: res,
|
|
1056
1058
|
res,
|
|
1057
1059
|
};
|
|
@@ -1061,6 +1063,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
1061
1063
|
ok: true,
|
|
1062
1064
|
status: res.status,
|
|
1063
1065
|
statusText: res.statusText,
|
|
1066
|
+
headers: res.headers,
|
|
1064
1067
|
response: res,
|
|
1065
1068
|
res,
|
|
1066
1069
|
};
|