This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

HttpClientJsonpModule

Configures the dependency injector for HttpClient with supporting services for JSONP. Without this module, Jsonp requests reach the backend with method JSONP, where they are rejected.

See more...

      
      class HttpClientJsonpModule {
}
    

Description

You can add interceptors to the chain behind HttpClient by binding them to the multiprovider for built-in DI token HTTP_INTERCEPTORS.

Providers

Provider
      
      JsonpClientBackend
    
{ provide: JsonpCallbackContext, useFactory: jsonpCallbackContext }
      
      { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext }
    
{ provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true }
      
      { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true }