Loading topic
HttpClient.get() and post(), and the basics of RxJS (Observable, pipe, tap). It builds the working model of an interceptor. Later chapters cover cloning, registration, ordering and the individu5 min readHttpClient calls. You should also know what pipe, tap and catchError do in RxJS. This chapter covers one rule that every interceptor follows: an HttpRequest cannot be changed after it is created5 min readHttpClient calls, and the RxJS basics pipe, tap and catchError. It covers the shape of a functional interceptor and the three things one can do with a request. Registration, ordering, and the auth, log4 min readprovideHttpClient function. Here you will learn where interceptors are registered, how the array order sets the execution order, and what go6 min readHttpInterceptorFn and register it with provideHttpClient(withInterceptors([...])). It also assumes you know basic RxJS: pipe, tap, and catchError. Here you will learn which interceptor sees a request first, which sees the res5 min readinject() function from @angular/core. This chapter covers where that call is allowed, what you can inject, and the mistakes that cause runtime errors. It assumes you 5 min readHttpRequest immutability, `HttpInterce5 min readwithInterceptors, and use pipe, tap, and map in RxJS. It covers what the observable returned by next emits and how to log, time, and transform responses.5 min readwithInterceptors. It also assumes you know pipe, tap and catchError from RxJS. Here you will move error handling out of individual components and into interceptors. You will also add a retry policy that is safe for5 min readHttpRequest is immutable and must be cloned, and you are comfortable with inject() inside an interceptor. It covers how to change an interceptor's behavior for a single request without touching the URL or add5 min readHttpClient GET and POST calls, and basic RxJS. It also assumes you have written the authInterceptor from the earlier chapter on attaching an authoriza5 min readwithInterceptors, use inject() inside it, and read basic RxJS (catchError, switchMap, shareReplay). It builds on the authentication interceptor and the HttpContextToken from earlier chapters.4 min readwithInterceptors, and use inject() and basic RxJS operators such as tap, catchError and retry. It collects the mistakes that cost the most debugging time, and the places where interceptors do not apply.5 min read