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

ReferenceError: FormData is not defined #6

Closed
lux opened this issue Jul 6, 2021 · 3 comments
Closed

ReferenceError: FormData is not defined #6

lux opened this issue Jul 6, 2021 · 3 comments

Comments

@lux
Copy link

lux commented Jul 6, 2021

First, I wanted to say I'm very excited about Miniflare. Thanks for making this!

It looks like the FormData class is not available in Miniflare yet. My use case is just to make a POST request to an external endpoint like so:

let formData = new FormData ()
formData.append ('field', someValue)

const response = await fetch ('https://example.com/post/here', {
    method: 'POST',
    body: formData
})

This has been tested and works with the current Cloudflare Workers. Thanks!

@mrbbot mrbbot closed this as completed in 6dbb9c2 Jul 6, 2021
@mrbbot
Copy link
Contributor

mrbbot commented Jul 6, 2021

Hello! 👋 Thanks for raising this. It will be fixed in the next release. 👍

@lux
Copy link
Author

lux commented Jul 6, 2021

Awesome!

@mrbbot
Copy link
Contributor

mrbbot commented Jul 10, 2021

Fixed in version 1.2.0! 🎉

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

2 participants