Created
December 23, 2017 02:47
-
-
Save aaronshaf/8d4cb4fa0476a926648269f1b82990db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let getIt = () => | |
Js.Promise.( | |
Fetch.fetch(url) | |
|> then_(Fetch.Response.json) | |
|> then_((json) => Js.Json.decodeObject(json) |> resolve) | |
|> then_((obj) => Js.log(obj /* how can I get obj.message? */) |> resolve) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment