It doesn’t look like there’s an http client library that works both on bucklescript and on native with the same api (please correct me if I’m wrong about this). Writing one requires having a cross-platform promises api that wraps JS.Promise on bucklescript and either lwt or async on native. Is anyone working on this? Would it be possible to make a “polyfill” for eg: Async.Deferred that wrapped JS.Promise on bucklescript? If it’s possible that makes more sense to me than inventing a new api because the ocaml community has had years to discover the warts in Async and lwt.
I would really like to know this as well, it would be great if the reason knowledge gained could be applied to writing native server applications.
It would be a major selling point for companies to be able to unify their Http Clients across platforms, any news about it ?
There’s https://github.com/aantron/repromise which wraps Lwt, Js.Promises and Luv (https://github.com/aantron/luv), combined with something like https://github.com/glennsl/refetch/ I’d say that’s a pretty good start!
I think that the ecosystem lacks of a Async primitive. Http-client will be built on top of this primitive.
This sounds like a good start but I’m wondering about the status of
I asked the other day, and it’s still active!
I might experiment a bit this weekend, but there are efforts happening (Refetch, Revery, anurag etc) might ”just” be a question of combining them!
Has there been any progress on this? Sounds like an awesome idea to create a unified client.