Files
74ca99c866 Server Router Improvements (#45716)
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]>
2023-02-15 00:16:45 +00:00

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 }),
})
}