HttpHeaderResponse
一个部分 HTTP 请求,它只包括状态和响应头数据,但没有响应体。
A partial HTTP response which only includes the status and header data, but no response body.
class HttpHeaderResponse extends HttpResponseBase {
constructor(init: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {})
type: HttpEventType.ResponseHeader
clone(update: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {}): HttpHeaderResponse
// 继承自 common/http/HttpResponseBase
constructor(init: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; }, defaultStatus: number = 200, defaultStatusText: string = 'OK')
headers: HttpHeaders
status: number
statusText: string
url: string | null
ok: boolean
type: HttpEventType.Response | HttpEventType.ResponseHeader
}
说明
HttpHeaderResponse
是一个可用于响应事件流的 HttpEvent
,只有在要求了进度事件时才有效。
HttpHeaderResponse
is a HttpEvent
available on the response event stream, only when progress events are requested.
构造函数
根据给定的参数创建新的 Create a new | |||
参数
|
属性
属性 | 说明 |
---|---|
type: HttpEventType.ResponseHeader | 只读 |
方法
复制这个 Copy this | |||
参数
返回值 |