( interceptorFns: HttpInterceptorFn[], )
| 147 | * @publicApi |
| 148 | */ |
| 149 | export function withInterceptors( |
| 150 | interceptorFns: HttpInterceptorFn[], |
| 151 | ): HttpFeature<HttpFeatureKind.Interceptors> { |
| 152 | return makeHttpFeature( |
| 153 | HttpFeatureKind.Interceptors, |
| 154 | interceptorFns.map((interceptorFn) => { |
| 155 | return { |
| 156 | provide: HTTP_INTERCEPTOR_FNS, |
| 157 | useValue: interceptorFn, |
| 158 | multi: true, |
| 159 | }; |
| 160 | }), |
| 161 | ); |
| 162 | } |
| 163 | |
| 164 | const LEGACY_INTERCEPTOR_FN = new InjectionToken<HttpInterceptorFn>( |
| 165 | typeof ngDevMode !== 'undefined' && ngDevMode ? 'LEGACY_INTERCEPTOR_FN' : '', |
no test coverage detected
searching dependent graphs…