Angular HTTP Interceptor: Sending Bearer Tokens with Every API Request
When building an Angular application that communicates with secured APIs, we usually need to send an authentication token with every protected HTTP request. Instead of manually adding the Authorization header in every service, Angular provides HTTP Interceptors. An HTTP interceptor allows us to intercept outgoing HTTP requests, modify them, and then pass them to the … Read more