blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
155 stars 20 forks source link

Fix request body validation #67

Closed blomqma closed 1 year ago

blomqma commented 1 year ago

When using App Route and the NextRequest to validate the request body, we need to clone the request object to validate the body to allow further parsing of the request body. Before this change, trying to parse the request body in the request handler resulted in an error if the request body was already parsed by the request body validation logic.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-rest-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2023 8:03am
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2023 8:03am