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.
@@ -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]) => key === `${method?.toUpperCase()}-${uri.pathname}`)
1072
+ .filter(([key]) => {
1073
+ const ending = `-${method?.toUpperCase()}-${uri.pathname}`;
1074
+ return key.endsWith(ending);
1075
+ })
1073
1076
  .map(([_, interceptor]) => interceptor);
1074
- // console.log(`for ${uri.pathname} global ${globalInterceptors.length} method: ${methodInterceptors.length}`);
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));