This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

HttpHeaderResponse

npm Package @angular/common
Module import { HttpHeaderResponse } from '@angular/common/http';
Source common/http/src/response.ts

Overview

      
      class HttpHeaderResponse extends HttpResponseBase {
  constructor(init: {...})
  get type: HttpEventType.ResponseHeader
  clone(update: {...}): HttpHeaderResponse
  // inherited from common/http/HttpResponseBase
  get headers: HttpHeaders
  get status: number
  get statusText: string
  get url: string | null
  get ok: boolean
  get type: HttpEventType.Response | HttpEventType.ResponseHeader
}
    

Description

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

HttpHeaderResponse is a HttpEvent available on the response event stream, only when progress events are requested.

Constructor

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

Create a new HttpHeaderResponse with the given parameters.

Members


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

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