Skip to content

Instantly share code, notes, and snippets.

@dbrattli
Created October 14, 2018 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbrattli/a1b4fc421bdde2a9642320d57e941a06 to your computer and use it in GitHub Desktop.
Save dbrattli/a1b4fc421bdde2a9642320d57e941a06 to your computer and use it in GitHub Desktop.
Fetch
let fetch(uri: string) =
let timeout = Promise.sleep 100
let response = sprintf "Got response from: %s" uri
let result = Promise<string> ()
timeout.Then(fun _ -> result.Resolve(response) ) |> ignore
result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment