@angular/common/http

入口点

主要

@angular/common

次要

@angular/common/http
@angular/common/http/testing
@angular/common/testing

导出列表

HttpBackend

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

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

HttpHandler

Transforms an HttpRequest into a stream of HttpEvents, one of which will likely be a HttpResponse.

把一个 HttpRequest 转换成 HttpEvent 组成的流,HttpResponse 就是其中之一。

HttpClient

Perform HTTP requests.

执行 HTTP 请求。

HttpHeaders

Immutable set of Http headers, with lazy parsing.

Http 头的不可变集合,惰性解析。

JsonpClientBackend

HttpBackend that only processes HttpRequest with the JSONP method, by performing JSONP style requests.

JsonpInterceptor

An HttpInterceptor which identifies requests with the method JSONP and shifts them to the JsonpClientBackend.

HttpClientJsonpModule

An NgModule that enables JSONP support in HttpClient.

一个 NgModule,用来为 HttpClient 启用 JSONP 支持。

HttpClientModule

An NgModule that provides the HttpClient and associated services.

一个 NgModule,可以提供 HttpClient 及其相关服务。

HttpClientXsrfModule

An NgModule that adds XSRF protection support to outgoing requests.

一个NgModule,用于给外发请求添加 XSRF 保护。

HttpParams

An HTTP request/response body that represents serialized parameters, per the MIME type application/x-www-form-urlencoded.

HTTP 请求/响应体,用来表示序列化参数,它们的 MIME 类型都是 application/x-www-form-urlencoded

HttpUrlEncodingCodec

A HttpParameterCodec that uses encodeURIComponent and decodeURIComponent to serialize and parse URL parameter keys and values.

一个 HttpParameterCodec,它使用 encodeURIComponentdecodeURIComponent 来序列化和解析 URL 参数的 key 和 value。

HttpRequest

An outgoing HTTP request with an optional typed body.

一个外发的 HTTP 请求,带有一个可选的类型化的请求体(body)。

HttpErrorResponse

A response that represents an error or failure, either from a non-successful HTTP status, an error while executing the request, or some other failure which occurred during the parsing of the response.

一个用于表示错误或失败的响应对象,或者来自执行请求时发生的错误给出的失败的 HTTP 状态码,或者来自在解析响应对象期间发生的其它错误。

HttpHeaderResponse

A partial HTTP response which only includes the status and header data, but no response body.

一个部分 HTTP 请求,它只包括状态和响应头数据,但没有响应体。

HttpResponse

A full HTTP response, including a typed response body (which may be null if one was not returned).

一个完整的 HTTP 响应对象,包括一个带类型的响应体(如果没返回内容,则为 null)。

HttpResponseBase

Base class for both HttpResponse and HttpHeaderResponse.

HttpResponseHttpHeaderResponse 的共同基类。

HttpXhrBackend

An HttpBackend which uses the XMLHttpRequest API to send requests to a backend server.

XhrFactory

A wrapper around the XMLHttpRequest constructor.

HttpXsrfTokenExtractor

Retrieves the current XSRF token to use with the next outgoing request.

结构

HttpInterceptor

Intercepts HttpRequest and handles them.

拦截 HttpRequest 并处理它们。

HttpParameterCodec
HttpDownloadProgressEvent

A download progress event.

下载进度事件。

HttpEventType

Type enumeration for the different kinds of HttpEvent.

不同种类的 HttpEvent 的枚举类型。

HttpProgressEvent

Base interface for progress events.

HttpSentEvent

An event indicating that the request was sent to the server. Useful when a request may be retried multiple times, to distinguish between retries on the final event stream.

用于表示请求已经发到服务器的事件。 当请求可能被多次接受时很有用,以区分出最终事件流上的重试行为。

HttpUserEvent

A user-defined event.

用户定义的事件。

类型

HTTP_INTERCEPTORS

A multi-provider token which represents the array of HttpInterceptors that are registered.

HttpEvent

Union type for all possible events on the response stream.

响应流中所有可能出现的事件的联合类型。