In order to set headers for every request in Angular 7, HTMLHttpRequest is used. There is a number of benefits such as testability features, types request, request and response interception, observable APIs and streamlined error handling that is associated with, XMLHttpRequest.

Related Interview Questions: AngularJS Interview Questions
BY Best Interview Question ON 25 Mar 2020