I\'m trying to extent angular 2 http class to be able to handle global errors and set up headers for my secureHttp service. I found some solutions but it doesn\'t work with
You can check https://www.illucit.com/blog/2016/03/angular2-http-authentication-interceptor/ which will help you.
Change your providers as below for latest release and check it :
providers: [
{
provide: SecureHttpService,
useFactory: (backend: XHRBackend, defaultOptions: RequestOptions) => {
return new SecureHttpService(backend, defaultOptions);
},
deps: [ XHRBackend, RequestOptions]
},
Title
]