HTTP Interceptors |Multiple Interceptors | Interceptors UseCases (Tutorial 37)
YouTube Viewers YouTube Viewers
30.9K subscribers
37,425 views
0

 Published On Jul 27, 2021

► Interceptors are a unique type of Angular Service that we can implement. Interceptors allow us to intercept incoming or outgoing HTTP requests using the HttpClient. By intercepting the HTTP request, we can modify or change the value of the request.

We can perform various operation using interceptors like:

► Modifying HTTP Headers
► Modifying request body
► Interceptors can be used to set authentication and authorization token.
► If you want to mock the backend API, there also interceptors are life saver.

If you want to modify thee response, like you got the response in XML and want to convert it to JSON, Interceptors are helpful.
►We can leverage Interceptors to also handle HTTP errors

So Useful things we can do with Http Interceptors are endless
Please check the complete tutorial on :
►HTTP Service:    • HTTP Service - Angular (Tutorial #18)  
► Immutable/Mutable:    • ES6 Tutorial #5: Mutable and Immutabl...  

DON'T CLICK HERE: https://shorturl.at/AFGJT

This code is available on github:
https://github.com/nishaSingla/Angula...

This Book will help you to understand angular more: https://amzn.to/3f1nf9q

I have used below FAKE API in demo to illustrate the AsyncSubject:
https://restcountries.eu/rest/v2/name...

►Subscribe Now:    / nishasingla   🔔 Stay updated!

Watch complete playlist here:    • Introduction- Angular (Tutorial #1)  

Follow us on:

Facebook:   / angularjs4beginners  
LinkedIn:   / nisha-singla-82407aa0  
Instagram:   / passion4code  

#httpInterceptors #interceptor #nishasingla

show more

Share/Embed