Interface Response
interface Response {
body: ReadableStream<Uint8Array>;
bodyUsed: boolean;
headers: Headers;
ok: boolean;
redirected: boolean;
status: number;
statusText: string;
type: ResponseType;
url: string;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
bytes(): Promise<Uint8Array>;
clone(): Response;
formData(): Promise<FormData>;
json(): Promise<any>;
text(): Promise<string>;
}
body: ReadableStream<Uint8Array>;
bodyUsed: boolean;
headers: Headers;
ok: boolean;
redirected: boolean;
status: number;
statusText: string;
type: ResponseType;
url: string;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
bytes(): Promise<Uint8Array>;
clone(): Response;
formData(): Promise<FormData>;
json(): Promise<any>;
text(): Promise<string>;
}
Hierarchy
- Body
- Response (View Summary)
Properties
Readonly
body
Readonly
bodyUsed
bodyUsed: boolean
Readonly
headers
Readonly
ok
ok: boolean
Readonly
redirected
redirected: boolean
Readonly
status
status: number
Readonly
statusText
statusText: string
Readonly
type
Readonly
url
url: string
Methods
arrayBuffer
- arrayBuffer(): Promise<ArrayBuffer>
Returns Promise<ArrayBuffer>
blob
bytes
- bytes(): Promise<Uint8Array>
Returns Promise<Uint8Array>
This Fetch API interface represents the response to a request.
MDN Reference