Skip to content
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 cannot be correclty sent when call is made from a web worker #4733

Closed
stillgbx opened this issue May 19, 2022 · 1 comment
Closed

Comments

@stillgbx
Copy link

Describe the bug

FormData cannot be correclty sent when call is made from a web worker.
Content-Type request header seems incorrect because it's not deleted by axios to let the browser set the header.
isStandardBrowserEnv does not detect that the call is made from a web worker.

Changing isStandardBrowserEnv doesn't seem enough because other(s) part(s) of the code (like in isURLSameOrigin.js) rely on the result to use document (which is therefore not available in a web worker).

To Reproduce

Send FormData from a Web Worker.

Expected behavior

FormData should be sent correctly (like in v 0.26.1).

Environment

  • Axios Version >= 0.27.0
  • Browser : all
  • OS : all

Additional context/Screenshots

image

image

@DigitalBrainJS
Copy link
Collaborator

Fixed in #5139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants