How can we have multiple instances of HttpClient with Angular ?

Since Angular 4.3, the Angular framework offer a new HTTP client named HttpClient. This HTTP client put forward a new interceptor mechanism. But, it turns out that this mechanism is common to the entire application.

Assume that you have to consume two Rest API from 2 different providers. With the current mechanism, and using the HttpClient service, the stack of interceptors will be the same for the both Rest API. This may be problematic due to an incompatibility between interceptors and Rest API. An interceptor running on a Rest API 1 may not be able to run on a Rest API 2.

A solution might be to create two HttpClient instances but … It is a pitfall. If you can create two HttpClient instances like that :