diff --git a/examples/api-routes/api/test.post.ts b/examples/api-routes/api/test.post.ts index 710f745b69..04bdd4d4a9 100644 --- a/examples/api-routes/api/test.post.ts +++ b/examples/api-routes/api/test.post.ts @@ -1 +1,7 @@ -export default defineEventHandler(() => "Test post handler"); +export default defineEventHandler(async () => { + const body = await readBody(event); + return { + message: "Test post handler", + body, + }; +});