AppRouterApiHandlerFn = (req:NextRequest|Request,ctx:AppRouterContext) =>Promise<Response|NextResponse> |Response|NextResponse
Represents a Next.js App Router Route Handler function.
| Parameter | Type | Description |
|---|---|---|
req | NextRequest | Request | The incoming request object. |
ctx | AppRouterContext | Route context containing dynamic route parameters. |
Promise<Response | NextResponse> | Response | NextResponse
A Response or NextResponse, or a Promise resolving to one.