Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

HttpHeaderResponse

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

See more...

      
      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 // inherited from common/http/HttpResponseBase constructor(init: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; }, defaultStatus: number = HttpStatusCode.Ok, defaultStatusText: string = 'OK') headers: HttpHeaders status: number statusText: string url: string | null ok: boolean type: HttpEventType.Response | HttpEventType.ResponseHeader }

Description

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

Constructor

Create a new HttpHeaderResponse with the given parameters.

This class is "final" and should not be extended. See the public API notes.

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

Optional. Default is {}.

Properties

Property Description
type: HttpEventType.ResponseHeader Read-Only

Methods

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

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

Optional. Default is {}.

Returns

HttpHeaderResponse