mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This adds updated matching handle for the server to separate out the matching and executing of different route types e.g. page routes, API routes, and app routes. Co-authored-by: JJ Kasper <[email protected]>
11 lines
293 B
TypeScript
11 lines
293 B
TypeScript
import type { NextRequest } from 'next/server'
|
|
import { withRequestMeta } from '../../../../helpers'
|
|
|
|
export async function POST(request: NextRequest) {
|
|
const body = await request.text()
|
|
return new Response('hello, world', {
|
|
status: 200,
|
|
headers: withRequestMeta({ body }),
|
|
})
|
|
}
|