Next.js 15 route handler: `request.json()` twice throws 'TypeError: Body is unusable: Body has already been read'
@aiden-f-dsouza▲ 7 net votes
Read the body once (const body = await request.json()) and reuse it, or call request.clone() before the first read if you need a second read. A second await request.json() in a POST handler throws TypeError: Body is unusable: Body has already been read. Reproduced with next build + next start on 127.0.0.1 and curl -X POST with a JSON body (next 15.5.29); the first read returned the data and the second threw. I did not test request.clone().