-
Notifications
You must be signed in to change notification settings - Fork 158
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
Formdata is missing when submit by fetch #64
Comments
close since nobody care. |
Hi @spacedragon, I have just came back from a 1 month vacation, where I had no access to a computer so it's really not that we don't care about your issue but we might be just busy. Now let's talk about the issue, you say that form data is missing from fetch, how do you know it's missing? Did you check it on the request or in the chrome dev tools? Can you post a small example where this isn't working or post more data on how you tested it and which hooks and operations in those hooks you used so we can further debug it? Please note that if you found out the form data is missing using the Chrome devtools, it is a bug in Google Chrome which I opened an issue for and should be fixed hopefully in the near future. Here is the bug report if you wish to track it and see when it's fixed: Thanks for reporting the bug and helping us improve! |
Hi @spacedragon Unfortunately I'm not able to reproduce this issue so unless you can provide more info or a failing examples I'll have to close this issue. Please let me know if this is still relevant so we can try to resolve this issue. Thanks |
try the following code;
|
Ok, I am able to reproduce the issue. It looks like the request parameters turn in [Object object] instead of the correct payload. I do want to mention though that testing this using the chrome dev tools currently isn't possible because of the bug I mentioned which was confirmed by the chromium team. I reproduced the issue with Firefox and will start looking into it |
Hi @spacedragon The problem was that the fetch implementation wasn't sending the real FormData object to the server causing the server to recieve a string of "[Object object]". Will appreciate if you could try it out and see if it fixed your version by installing xhook with the latest commit hash: 93879b7 If you are using npm it should look like this in your package.json: {
"dependencies": {
"xhook": "jpillora/xhook#93879b7"
}
} |
Fixed in 1.4.5 |
I'm finding this issue when using 1.4.5 and 1.4.9. It may be an environmental thing or something specific to my package code, but it's the same symptom of the body FormData getting wiped out and showing [Object object] instead. It's odd that I would find this issue in later revisions. I've confirmed that the xhook node_module folder I have is actually built with 1.4.9 and contains code from 93879b7 The weirdest part is that this is happening for me despite using the native window fetch by capturing it from |
Just verifying, I'm still encountering this. |
My following code failed
should code here https://github.com/jpillora/xhook/blob/gh-pages/src/xhook.coffee#L511
handle formdata ?
The text was updated successfully, but these errors were encountered: