BodyMixin
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:30
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BodyMixin(): BodyMixin;
Returns
Section titled “Returns”BodyMixin
Properties
Section titled “Properties”arrayBuffer()
Section titled “arrayBuffer()”readonly arrayBuffer: () => Promise<ArrayBuffer>;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:34
Returns
Section titled “Returns”blob()
Section titled “blob()”readonly blob: () => Promise<Blob>;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:35
Returns
Section titled “Returns”readonly body: | null| ReadableStream<any>;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:31
bodyUsed
Section titled “bodyUsed”readonly bodyUsed: boolean;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:32
bytes()
Section titled “bytes()”readonly bytes: () => Promise<Uint8Array<ArrayBufferLike>>;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:36
Returns
Section titled “Returns”Promise
<Uint8Array
<ArrayBufferLike
>>
formData()
Section titled “formData()”readonly formData: () => Promise<FormData>;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:54
Returns
Section titled “Returns”Example
Section titled “Example”import { Busboy } from '@fastify/busboy'import { Readable } from 'node:stream'
const response = await fetch('...')const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } })
// handle events emitted from `busboy`
Readable.fromWeb(response.body).pipe(busboy)
json()
Section titled “json()”readonly json: () => Promise<unknown>;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:55
Returns
Section titled “Returns”Promise
<unknown
>
text()
Section titled “text()”readonly text: () => Promise<string>;
Defined in: node_modules/.pnpm/undici-types@7.13.0/node_modules/undici-types/fetch.d.ts:56
Returns
Section titled “Returns”Promise
<string
>