HttpClientResponse class

The Response subclass returned by methods such as HttpClient.fetch().

Remarks

This is a placeholder. In the future, additional HttpClient-specific functionality may be added to this class.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the HttpClientResponse class.

Properties

bodyUsed

See documentation for the browser's Body API

headers

See documentation for the browser's Response API

nativeResponse
ok

See documentation for the browser's Response API

status

See documentation for the browser's Response API

statusText

See documentation for the browser's Response API

type

See documentation for the browser's Response API

url

See documentation for the browser's Response API

Methods

arrayBuffer()

See documentation for the browser's Body API

blob()

See documentation for the browser's Body API

clone()
formData()

See documentation for the browser's Body API

json()

See documentation for the browser's Body API

text()

See documentation for the browser's Body API

Property Details

bodyUsed

See documentation for the browser's Body API

get bodyUsed(): boolean;

Property Value

boolean

headers

See documentation for the browser's Response API

get headers(): Headers;

Property Value

Headers

nativeResponse

protected nativeResponse: Response;

Property Value

Response

ok

See documentation for the browser's Response API

get ok(): boolean;

Property Value

boolean

status

See documentation for the browser's Response API

get status(): number;

Property Value

number

statusText

See documentation for the browser's Response API

get statusText(): string;

Property Value

string

type

See documentation for the browser's Response API

get type(): ResponseType;

Property Value

ResponseType

url

See documentation for the browser's Response API

get url(): string;

Property Value

string

Method Details

arrayBuffer()

See documentation for the browser's Body API

arrayBuffer(): Promise<ArrayBuffer>;

Returns

Promise<ArrayBuffer>

blob()

See documentation for the browser's Body API

blob(): Promise<Blob>;

Returns

Promise<Blob>

clone()

/** @virtual */
clone(): HttpClientResponse;

Returns

formData()

See documentation for the browser's Body API

formData(): Promise<FormData>;

Returns

Promise<FormData>

json()

See documentation for the browser's Body API

json(): Promise<any>;

Returns

Promise<any>

text()

See documentation for the browser's Body API

text(): Promise<string>;

Returns

Promise<string>