Pages

Sep 13, 2018

What are Angular HTTP interceptors anyway?


Sometimes it takes more time or words to describe a concept in natural language, than to express it in code. Angular’s HTTP interceptors are such an example. The implementation is about half the size (about 30 lines of code at the time of writing) of the documentation (80 lines). Understanding the code behind frameworks’ features is often desirable as it improves understanding of language concepts (Promises in the case) as well as use cases for frameworks’ features. In this article I am presenting the code that is driving Angular’s HTTP interceptor feature. You will learn how easy it is to look at Angular’s codebase, how versatile Promises are and we will look back at a common cross-cutting concern which is handled with HTTP interceptors.




QuickBooks Self-Employed

Bigger tax refunds. Better organization. Manage your deductions with QuickBooks Self-Employed .