Auth & HTTP
Angular HTTP, interceptors, and headers
See how the interceptor chain transforms a request and handles a response.
AUTH & HTTP / REQUEST PATH
REQUEST · SYNTHETIC LESSON DATA
Event log
- Add a request header
Objective
Trace request cloning, response order, and a bounded retry through Angular functional interceptors.
Transcript
Angular 22.3.2
- A scoped HttpClient sends a fixture GET through two functional interceptors in registration order.
- The first interceptor clones the request to add a teaching header. The original remains unchanged.
- The fixture backend returns a real Angular HttpResponse or HttpErrorResponse. Responses are observed by the interceptors in reverse order.
- The retry scenario handles one 503 from the fixture backend and retries this GET once. The successful response identifies how many attempts occurred.