Closed yawaramin closed 4 years ago
Yeah, that's a tricky one. There's been some attempt at adding it to bs-fetch
too: https://github.com/reasonml-community/bs-fetch/pull/14
At the very least I think the formData
and blob
types should be added to Dom
in bs-platform
, to avoid needing bs-webapi
as a dependency of bs-fetch
for eaxmple. (And there's a few more types here that could be brought over then too, like image
).
I also think Bob had some thoughts about iterator support in BuckleScript a few years ago. I don't know if he's thought any more about that, but might be worth asking.
I took a look at https://developer.mozilla.org/en-US/docs/Web/API/FormData and it seems binding this will involve writing some tricky bindings like iterators, Blobs, and so on.
@glennsl do you have any suggestions for this? Or maybe I can play around with it a bit and see what I come up with.