Optional body: anyOptional init: ResponseInitOptional body?: BodyOptional url?: NextURLReadonly arrayReadonly blobReadonly bodyReadonly bodyReadonly cloneReadonly formThis method is not recommended for parsing multipart/form-data bodies in server environments. It is recommended to use a library such as @fastify/busboy as follows:
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)
This method is not recommended for parsing multipart/form-data bodies in server environments. It is recommended to use a library such as @fastify/busboy as follows:
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)
Readonly headersReadonly jsonReadonly okReadonly redirectedReadonly statusReadonly statusReadonly textReadonly typeReadonly urlStatic errorStatic jsonOptional init: ResponseInitStatic nextOptional init: MiddlewareResponseInitStatic redirectOptional init: number | ResponseInitStatic rewriteOptional init: MiddlewareResponseInit
This class extends the Web
ResponseAPI with additional convenience methods.Read more: Next.js Docs:
NextResponse