interface Body

Properties

readonly
body: ReadableStream<Uint8Array> | null
[src]

A simple getter used to expose a ReadableStream of the body contents.

readonly
bodyUsed: boolean
[src]

Stores a Boolean that declares whether the body has been used in a response yet.

Methods

arrayBuffer(): Promise<ArrayBuffer>[src]

Takes a Response stream and reads it to completion. It returns a promise that resolves with an ArrayBuffer.

blob(): Promise<Blob>[src]

Takes a Response stream and reads it to completion. It returns a promise that resolves with a Blob.

formData(): Promise<FormData>[src]

Takes a Response stream and reads it to completion. It returns a promise that resolves with a FormData object.

json(): Promise<any>[src]

Takes a Response stream and reads it to completion. It returns a promise that resolves with the result of parsing the body text as JSON.

text(): Promise<string>[src]

Takes a Response stream and reads it to completion. It returns a promise that resolves with a USVString (text).