Interface ResponseInfo

Serializable response info. Does not include the response body.

interface ResponseInfo {
    contentLength: null | number;
    ok: boolean;
    redirected: boolean;
    status: number;
    statusText: string;
    type: ResponseType;
    url: string;
}

Properties

contentLength: null | number

The number of bytes in the response.

ok: boolean

A boolean indicating whether the response was successful (status in the range 200 – 299) or not.

redirected: boolean

Indicates whether the response is the result of a redirect (that is, its URL list has more than one entry).

status: number

The status code of the response. (This will be 200 for a success).

statusText: string

The status message corresponding to the status code. (e.g., OK for 200).

type: ResponseType

The type of the response (e.g., basic, cors).

url: string

The URL of the response.