To set Http Request Header in Angular 2, create the HTTP Client Injectable class and inject the HttpClient object in the Component. Developers use HTTP Interceptors to set Http Request Header in Angular 4. To achieve this. Write an interceptor for adds a header for every request and after creating the interceptor, register it using HTTP_INTERCEPTORS in the @NgModule().

BY Best Interview Question ON 02 Feb 2020