NG.VII · Angular 22 practice question

A file-upload feature needs to display a live upload progress bar, but no upload progress events are arriving with the default HttpClient setup. Why?

Choose one answer
Check answer and explanation

Correct answer: The default fetch backend does not produce upload progress events.

Explanation

The default fetch backend has limitations, including not producing upload progress events, so switching to XMLHttpRequest via withXhr() is needed for upload progress.

Common trap

HttpClient does support upload progress events when configured with a backend that emits them, such as XMLHttpRequest. Switching to httpResource does not bypass the fetch API's lack of upload progress events.

Source: Angular docs: Setting up `HttpClient` — `withXhr`
Checked against the cited text on 2026-11-25.

Report an error in this question