-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying FormData body in beforeRequest hook does not work #645
Comments
As long as the |
Ok thanks. I’ll keep experimenting and see if I can figure it out. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to snake case my FormData beforeRequest. The ky-hooks-change-case library only works with non-FormData. So, I wrote my own.
I've got a unit test that proves
snakeCaseBody
works. I also logged the Content-Type header of the request and it looks correct:But on the receiving end of the API, I get an error that the body cannot be parsed as FormData.
Is this a limitation in ky, or am I doing something wrong?
The text was updated successfully, but these errors were encountered: