a4-http-header-interceptor
Angular 7 Http Header Interceptor
How-To
Install
npm install a4-http-header-interceptor
app.module.ts
- Add
HttpModule
to imports of theapp.module.ts
.
...;...
Inject the service
constructorprivate httpHeaderService: HttpHeaderService
Inject custom header to every http client operations
this.httpHeaderService.setHeader'key','value';