Next.js Discord

Discord Forum

Mutliple HTTP Methods

Unanswered
Abyssinian posted this in #help-forum
Open in Discord
AbyssinianOP
I am using the new App dir, I want to setup an API route that can receive multiple methods, like GET, POST, PATCH, etc. How can I achieve this?

2 Replies

Chub mackerel
export async function GET() {}
export async function POST() {}