@hyper-fetch/core 5.4.1 → 5.6.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/browser/index.cjs.js +20 -0
- package/dist/browser/index.cjs.js.map +2 -2
- package/dist/browser/index.esm.js +20 -0
- package/dist/browser/index.esm.js.map +2 -2
- package/dist/index.cjs.js +20 -0
- package/dist/index.cjs.js.map +2 -2
- package/dist/index.d.ts +20 -0
- package/dist/index.esm.js +20 -0
- package/dist/index.esm.js.map +2 -2
- package/package.json +1 -1
- package/src/client/client.ts +50 -0
|
@@ -2197,22 +2197,42 @@ var Client = class {
|
|
|
2197
2197
|
this.__onAuthCallbacks.push(callback);
|
|
2198
2198
|
return this;
|
|
2199
2199
|
};
|
|
2200
|
+
this.removeOnAuthInterceptors = (callbacks) => {
|
|
2201
|
+
this.__onAuthCallbacks = this.__onAuthCallbacks.filter((callback) => !callbacks.includes(callback));
|
|
2202
|
+
return this;
|
|
2203
|
+
};
|
|
2200
2204
|
this.onError = (callback) => {
|
|
2201
2205
|
this.__onErrorCallbacks.push(callback);
|
|
2202
2206
|
return this;
|
|
2203
2207
|
};
|
|
2208
|
+
this.removeOnErrorInterceptors = (callbacks) => {
|
|
2209
|
+
this.__onErrorCallbacks = this.__onErrorCallbacks.filter((callback) => !callbacks.includes(callback));
|
|
2210
|
+
return this;
|
|
2211
|
+
};
|
|
2204
2212
|
this.onSuccess = (callback) => {
|
|
2205
2213
|
this.__onSuccessCallbacks.push(callback);
|
|
2206
2214
|
return this;
|
|
2207
2215
|
};
|
|
2216
|
+
this.removeOnSuccessInterceptors = (callbacks) => {
|
|
2217
|
+
this.__onSuccessCallbacks = this.__onSuccessCallbacks.filter((callback) => !callbacks.includes(callback));
|
|
2218
|
+
return this;
|
|
2219
|
+
};
|
|
2208
2220
|
this.onRequest = (callback) => {
|
|
2209
2221
|
this.__onRequestCallbacks.push(callback);
|
|
2210
2222
|
return this;
|
|
2211
2223
|
};
|
|
2224
|
+
this.removeOnRequestInterceptors = (callbacks) => {
|
|
2225
|
+
this.__onRequestCallbacks = this.__onRequestCallbacks.filter((callback) => !callbacks.includes(callback));
|
|
2226
|
+
return this;
|
|
2227
|
+
};
|
|
2212
2228
|
this.onResponse = (callback) => {
|
|
2213
2229
|
this.__onResponseCallbacks.push(callback);
|
|
2214
2230
|
return this;
|
|
2215
2231
|
};
|
|
2232
|
+
this.removeOnResponseInterceptors = (callbacks) => {
|
|
2233
|
+
this.__onResponseCallbacks = this.__onResponseCallbacks.filter((callback) => !callbacks.includes(callback));
|
|
2234
|
+
return this;
|
|
2235
|
+
};
|
|
2216
2236
|
this.addEffect = (effect) => {
|
|
2217
2237
|
this.effects = this.effects.concat(effect);
|
|
2218
2238
|
return this;
|