You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also we can intercept response event and transform.
exportfunctionloggingInterceptor(req: HttpRequest<unknown>,next: HttpHandlerFn): Observable<HttpEvent<unknown>>{returnnext(req).pipe(tap((event)=>{if(event.type===HttpEventType.Response){console.log(req.url,"returned a response with status",event.status);}}));}
Modifying Request
While we intercept the request, we can modify the events like: