-
Notifications
You must be signed in to change notification settings - Fork 238
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
Request of type FormData does not work in DemoPanel #618
Comments
🎉 Thanks for opening your first issue here! Welcome to the community! |
Hi @jk8, thanks for reporting this issue.
Can you provide details on the specific issue you're running into? |
I tried again and it seems fine. I must have made some mistake last time. Sorry for the confusion. I have opened PR #625 |
Hi @jk8, just checking in to see if the fix worked as expected before we close this issue |
yes, it works well. Thank you. It can be closed. |
Describe the bug
Our API uses a request with a FormData content type to send media files, and I noticed that the "Send API Request" button (in the API Demo panel) doesn't work properly for those requests. In the browser's network panel, I can see that the request payload only contains an initial delimiter (eg
------WebKitFormBoundarytopELwrKuCYnvZxH--
) but no content follows.Expected behavior
The content of the FormData request should be properly serialized.
Current behavior
The content of the FormData request is incomplete. It only contains the initial delimiter, but nothing else.
Possible solution
I found 2 problems in
makeRequest.ts
source:Content-Type
header set tomultipart/form-data
but does not contain a boundary separator. No need to set Content-Type -fetch()
will set the correct content-type automatically.I tried to solve this problem for my case here: jk8@796b32e
EDIT:
I can't create PR because latest commit ofv2.0.0
branch does not work for me at this time and I can't test it.Steps to reproduce
Context
Your Environment
The text was updated successfully, but these errors were encountered: