Open mismith opened 5 days ago
Potential fix here: https://github.com/posva/mande/pull/495
Thanks for the PR, you need to pass a first argument for data: await fetchClient.post({}, { priority: 30 });
@posva Are you sure? The workaround I shipped was
await fetchClient.post({ priority: 99 }, {});
but
await fetchClient.post({}, { priority: 99 });
suggest to me that the data would be empty and the options would have priority set, no? When I test it, it still fails.
At any rate, it seems like a logical error anyway, no? Why would you ever want data to 'leak' into the fetch options?
Oh yeah, I thought you wanted to pass the option, I misread
This simple request:
Throw this error:
Reproduction: https://stackblitz.com/edit/vitejs-vite-rdwntz?file=src%2Fmain.js
Looks like the payload that's intended to be data is being passes to fetch directly/outside of a stringified JSON body.