Application behavior
HTTP Client
Observe when requests start, how unsubscription cancels work, and what progress and error events look like.
Angular 22.3.2 · trace
Objective
Follow an HttpClient request from subscription to a response, a failure, or cancellation.
Transcript
Angular 22.3.2
- HttpClient request observables start work on subscription. Subscribing twice can create two independent requests.
- The fixture uses Angular’s testing backend to observe dispatch, unsubscription, download progress, and the completed response.
- A simulated HTTP failure enters the error callback. Verify that you received the expected status and that there are no outstanding requests.
- httpResource derives a request from signals. Changing the shelf value cancels the previous request and starts a new request for the current shelf.
- Every endpoint in these exercises is intercepted locally. Progress event support depends on the transport and the transfer.