next.js/test/e2e/client-max-body-size/app/api/echo/route.ts
route.ts16 lines351 B
import { NextRequest, NextResponse } from 'next/server'

export async function POST(request: NextRequest) {
  const body = await request.text()
  return new NextResponse(
    JSON.stringify({
      message: 'Hello World',
      bodySize: body.length,
    }),
    {
      status: 200,
      headers: { 'Content-Type': 'application/json' },
    }
  )
}
Quest for Codev2.0.0
/
SIGN IN