This Fetch API interface represents the response to a request.

interface Response {
    body: null | ReadableStream<Uint8Array>;
    bodyUsed: boolean;
    headers: Headers;
    ok: boolean;
    redirected: boolean;
    status: number;
    statusText: string;
    type: ResponseType;
    url: string;
    arrayBuffer(): Promise<ArrayBuffer>;
    blob(): Promise<Blob>;
    clone(): Response;
    formData(): Promise<FormData>;
    json(): Promise<any>;
    text(): Promise<string>;
}

Hierarchy (view full)

Properties

body: null | ReadableStream<Uint8Array>
bodyUsed: boolean
headers: Headers
ok: boolean
redirected: boolean
status: number
statusText: string
url: string

Methods

  • Returns Promise<ArrayBuffer>

  • Returns Promise<Blob>

  • Returns Promise<FormData>

  • Returns Promise<any>

  • Returns Promise<string>