填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫Home

HttpClientModule

為支援 XSRF 的 HttpClient 配置依賴注入器。它會被 HttpClientModule 自動匯入。

Configures the dependency injector for HttpClient with supporting services for XSRF. Automatically imported by HttpClientModule.

檢視"說明"...

      
      class HttpClientModule {
}
    

說明

透過把攔截器提供為內建的 DI 令牌 HTTP_INTERCEPTORS(允許有多個),你可以把它們新增到 HttpClient 呼叫鏈的後面。

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

提供商

提供商
      
      HttpClient
    
{ provide: HttpHandler, useClass: HttpInterceptingHandler }
      
      { provide: HttpHandler, useClass: HttpInterceptingHandler }
    
      
      HttpXhrBackend
    
{ provide: HttpBackend, useExisting: HttpXhrBackend }
      
      { provide: HttpBackend, useExisting: HttpXhrBackend }
    
BrowserXhr
      
      BrowserXhr
    
{ provide: XhrFactory, useExisting: BrowserXhr }
      
      { provide: XhrFactory, useExisting: BrowserXhr }