What is the purpose of an HTTP interceptor?
- A To cache HTTP responses only
- B To inspect and transform every outgoing request and incoming response in one place
- C To define API routes
- D To validate form input
Answer
To inspect and transform every outgoing request and incoming response in one place
Interceptors centralise cross-cutting concerns such as attaching auth tokens, refreshing them on 401, error handling and loading indicators.





