Http Interceptor in Angular

Hey all, another tutorial out on my blog, this time about how to replace Angular 1’s httpInterceptor to handle authentication, loading spinners, or anything else you might need to tie into http calls. If anyone has suggestions for a blog posts or questions on this one, just let me know :slight_smile:

1 Like I think this replaces the need for the verbose interceptor.

1 Like

Yep, after much discussion Angular added an http interceptor, so this is no longer needed. As long as you’re using a version of Angular with the interceptor you should use it, it will almost certainly be easier.

In your solution do you need read response headers with your interceptor? I needed to create an Interceptor too but I can’t read any header from response. I have success reading body fields only…