You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the fetch method in load says Request with GET/HEAD method cannot have body., even though the method is a "POST" request.
If i use an external endpoint, then the whole application crashes, and if i use a local endpoint then the webpage renders but the error is thrown on the server.
I tried debugging a little bit, and it seems like svelte-kit first throws a GET request, and then afterwards the correct POST request. Note that I am not 100% sure this is the case, it's just a hypothesis after adding logs around in node/polyfills.js.
I wanted to try and solve this issue myself because this is a critical bug for our application, but i sadly don't have the time today. I will help as much as i can if anyone will help solving this issue asap.
Describe the bug
Using the fetch method in load says
Request with GET/HEAD method cannot have body.
, even though the method is a "POST" request.If i use an external endpoint, then the whole application crashes, and if i use a local endpoint then the webpage renders but the error is thrown on the server.
I tried debugging a little bit, and it seems like svelte-kit first throws a GET request, and then afterwards the correct POST request. Note that I am not 100% sure this is the case, it's just a hypothesis after adding logs around in
node/polyfills.js
.I wanted to try and solve this issue myself because this is a critical bug for our application, but i sadly don't have the time today. I will help as much as i can if anyone will help solving this issue asap.
Reproduction
https://github.com/MathiasWP/sveltekit-load-external-fetch-post-error
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: