@whitesev/utils 1.4.9 → 1.5.1
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/index.amd.js +8 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +8 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +8 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +8 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +8 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/src/Httpx.d.ts +7 -6
- package/package.json +1 -1
- package/src/Httpx.ts +26 -13
package/dist/index.iife.js
CHANGED
|
@@ -1781,6 +1781,13 @@ var Utils = (function () {
|
|
|
1781
1781
|
else if ("onabort" in this.context.#defaultDetails) {
|
|
1782
1782
|
this.context.#defaultDetails.onabort.apply(this, argumentsList);
|
|
1783
1783
|
}
|
|
1784
|
+
if (this.context.HttpxResponseHook.errorResponseCallBack({
|
|
1785
|
+
type: "onabort",
|
|
1786
|
+
error: new TypeError("request canceled"),
|
|
1787
|
+
response: null,
|
|
1788
|
+
}) == null) {
|
|
1789
|
+
return;
|
|
1790
|
+
}
|
|
1784
1791
|
resolve({
|
|
1785
1792
|
status: false,
|
|
1786
1793
|
data: [...argumentsList],
|
|
@@ -2206,7 +2213,7 @@ var Utils = (function () {
|
|
|
2206
2213
|
*/
|
|
2207
2214
|
use(successFn, errorFn) {
|
|
2208
2215
|
if (typeof successFn !== "function" && typeof errorFn !== "function") {
|
|
2209
|
-
console.warn("[Httpx-interceptors-response]
|
|
2216
|
+
console.warn("[Httpx-interceptors-response] 必须传入一个拦截器函数");
|
|
2210
2217
|
return;
|
|
2211
2218
|
}
|
|
2212
2219
|
return this.context.HttpxResponseHook.add(successFn, errorFn);
|