填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

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.

构造函数

根据给定的参数创建新的 HttpHeaderResponse 对象。

Create a new HttpHeaderResponse with the given parameters.

constructor(init: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {})
      
      constructor(init: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {})
    
参数
init object

可选. 默认值是 {}.

属性

属性说明
type: HttpEventType.ResponseHeader只读

方法

复制这个 HttpHeaderResponse,使用给定的参数哈希对象覆盖其内容。

Copy this HttpHeaderResponse, overriding its contents with the given parameter hash.

clone(update: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {}): HttpHeaderResponse
      
      clone(update: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {}): HttpHeaderResponse
    
参数
update object

可选. 默认值是 {}.

返回值

HttpHeaderResponse