linkHttpResponseBase
| npm Package | @angular/common |
|---|---|
| Module | import { HttpResponseBase } from '@angular/common/http'; |
| Source | common/http/src/response.ts |
linkOverview
class HttpResponseBase {
constructor(init: {...}, defaultStatus: number = 200, defaultStatusText: string = 'OK')
get headers: HttpHeaders
get status: number
get statusText: string
get url: string | null
get ok: boolean
get type: HttpEventType.Response | HttpEventType.ResponseHeader
}
linkDescription
Base class for both HttpResponse and HttpHeaderResponse.
linkSubclasses
linkConstructor
constructor(init: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
}, defaultStatus: number = 200, defaultStatusText: string = 'OK')
Super-constructor for all responses.
The single parameter accepted is an initialization hash. Any properties of the response passed there will override the default values.
linkMembers
get type: HttpEventType.Response | HttpEventType.ResponseHeader
Type of the response, narrowed to either the full response or the header.