HttpBackend

最后一个 HttpHandler,它将会把该请求通过浏览器的 HTTP API 发到后端。

A final HttpHandler which will dispatch the request via browser HTTP APIs to a backend.

查看"说明"...

      
      abstract class HttpBackend implements HttpHandler {
  abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>
}
    

说明

拦截器位于 HttpClient 接口和 HttpBackend 之间。

Interceptors sit between the HttpClient interface and the HttpBackend.

当它被注入时,HttpBackend 会把请求直接发给后端,而不会经过拦截器链。

When injected, HttpBackend dispatches requests directly to the backend, without going through the interceptor chain.

方法

abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>
      
      abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>
    
参数
req HttpRequest
返回值

Observable<HttpEvent<any>>