NG.VII · Angular 22 practice question
A developer wants to opt into upload and download progress events on an HttpClient request. Why are they off by default, and which options enable them?
Check answer and explanation
Correct answer: They are disabled due to performance cost and enabled with reportUploadProgress and reportDownloadProgress.
Explanation
Progress events carry a performance cost, so they are disabled by default and enabled with reportUploadProgress and reportDownloadProgress.
Common trap
Progress events are not disabled for security reasons, and trackUpload/trackDownload are not valid HttpClient options. Progress events do not cause extra network round-trips, and enableProgressEvents is not the option name.
Source: Angular docs: Making HTTP requests — Receiving raw progress events
Checked against the cited text on 2026-11-25.