HttpResponse
Class
stable
A full HTTP response, including a typed response body (which may be null
if one was not returned).
constructor
HttpResponse<T>Construct a new HttpResponse.
@paraminit
{ body?: T | null | undefined; headers?: HttpHeaders | undefined; status?: number | undefined; statusText?: string | undefined; url?: string | undefined; }@returns
HttpResponse<T>body
T | nullThe response body, or null if one was not returned.
clone
3 overloads@returns
HttpResponse<T>@paramupdate
{ headers?: HttpHeaders | undefined; status?: number | undefined; statusText?: string | undefined; url?: string | undefined; }@returns
HttpResponse<T>@paramupdate
{ body?: V | null | undefined; headers?: HttpHeaders | undefined; status?: number | undefined; statusText?: string | undefined; url?: string | undefined; }@returns
HttpResponse<V>headers
HttpHeadersAll response headers.
status
numberResponse status code.
statusText
stringTextual description of response status code, defaults to OK.
Do not depend on this.
url
string | nullURL of the resource retrieved, or null if not available.
ok
booleanWhether the status code falls in the 2xx range.
Description
A full HTTP response, including a typed response body (which may be null
if one was not returned).
HttpResponse is a HttpEvent available on the response event
stream.
Jump to details