class
final
A full HTTP response, including a typed response body (which may be null
if one was not returned).
class HttpResponse<T> extends HttpResponseBase { constructor(init: { body?: T; headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {}) body: T | null override type: HttpEventType.Response clone(update: { body?: any; headers?: HttpHeaders; status?: number; statusText?: string; url?: string; } = {}): HttpResponse<any> // 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 }
HttpResponse
is a HttpEvent
available on the response event stream.
Construct a new | |||
|
init | object | Optional. Default is |
Property | Description |
---|---|
body: T | null | Read-Only The response body, or |
override | |
type: HttpEventType.Response | Read-Only |
clone() | ||||||
---|---|---|---|---|---|---|
|
update | object |
clone<V>(update: { body?: V; headers?: HttpHeaders; status?: number; statusText?: string; url?: string; }): HttpResponse<V>
update | object |
HttpResponse<V>
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/common/http/HttpResponse