How use async service into angular httpClient interceptor
问题 Using Angular 4.3.1 and HttpClient, I need to modify the request and response by async service into the HttpInterceptor of httpClient, Example for modifying the request: export class UseAsyncServiceInterceptor implements HttpInterceptor { constructor( private asyncService: AsyncService) { } intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { // input request of applyLogic, output is async elaboration on request this.asyncService.applyLogic(req).subscribe(