Description
openapi-fetch version
0.13.4
Description
I'm trying to use openapi-fetch in a Next.js 14 app and I've noticed the body
is being omitted from POST
requests made from within server functions and RSCs. Specifically, prior to calling new CustomRequest()
, requestInit.body
contains the expected serialized/stringified object, however it's missing from the request
instance that's created.
Admittedly, I haven't tried this in a different framework yet, so I'm not entirely sure whether this could be related to Next.js at this point. I just wanted to include that context in case it helps.
Reproduction
Make a POST
request from a server function or RSC and observe the API request will be made without a body
.
Expected result
Fetch requests containing a body
that are made via openapi-fetch should pass the serialized data to the API as a standard fetch request would.
Extra
- I’m willing to open a PR (see CONTRIBUTING.md)