ng2-rest 19.0.40 → 19.0.42
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/browser/fesm2022/ng2-rest.mjs +7 -2
- package/browser/fesm2022/ng2-rest.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/rest-request.js +7 -2
- package/lib/rest-request.js.map +1 -1
- package/package.json +2 -1
- package/scss/vars.scss +6 -6
- package/websql/fesm2022/ng2-rest.mjs +7 -2
- package/websql/fesm2022/ng2-rest.mjs.map +1 -1
- package/websql/package.json +1 -1
|
@@ -1069,9 +1069,14 @@ class RestRequest {
|
|
|
1069
1069
|
const backend = new AxiosBackendHandler();
|
|
1070
1070
|
const globalInterceptors = Array.from(this.interceptors.entries()).map(([_, interceptor]) => interceptor);
|
|
1071
1071
|
const methodInterceptors = Array.from(this.methodsInterceptors.entries())
|
|
1072
|
-
.filter(([key]) =>
|
|
1072
|
+
.filter(([key]) => {
|
|
1073
|
+
const ending = `-${method?.toUpperCase()}-${uri.pathname}`;
|
|
1074
|
+
return key.endsWith(ending);
|
|
1075
|
+
})
|
|
1073
1076
|
.map(([_, interceptor]) => interceptor);
|
|
1074
|
-
// console.log(
|
|
1077
|
+
// console.log(
|
|
1078
|
+
// `for ${uri.pathname} global ${globalInterceptors.length} method: ${methodInterceptors.length}`,
|
|
1079
|
+
// );
|
|
1075
1080
|
const allInterceptors = [...globalInterceptors, ...methodInterceptors];
|
|
1076
1081
|
const handler = buildInterceptorChain(allInterceptors, backend);
|
|
1077
1082
|
response = await firstValueFrom(handler.handle(axiosConfig));
|