a4-http-header-interceptor
TypeScript icon, indicating that this package has built-in type declarations

9.0.0 • Public • Published

a4-http-header-interceptor

Angular 7 Http Header Interceptor

How-To

Install

npm install a4-http-header-interceptor

app.module.ts

  1. Add HttpModule to imports of the app.module.ts.
 
...
import { HttpHeaderModule } from 'a4-http-header-interceptor';
...
 
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    ...,
    HttpHeaderModule,
    ...
  ],
  ...
})

Inject the service

constructor(private httpHeaderServiceHttpHeaderService) { }

Inject custom header to every http client operations

this.httpHeaderService.setHeader('key','value');

Package Sidebar

Install

npm i a4-http-header-interceptor

Weekly Downloads

1

Version

9.0.0

License

MIT

Unpacked Size

99.9 kB

Total Files

26

Last publish

Collaborators

  • cccheng