Skip to content

Instantly share code, notes, and snippets.

@x86128
Created October 17, 2017 05:09
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 x86128/645835a3f876625ce022fb5283428813 to your computer and use it in GitHub Desktop.
Save x86128/645835a3f876625ce022fb5283428813 to your computer and use it in GitHub Desktop.
import asyncdispatch
import httpclient
proc getres() : Future[string] {.async.} =
var client = newAsyncHttpClient()
result = client.getContent("http://google.com")
echo(waitFor getres())
@x86128
Copy link
Author

x86128 commented Oct 17, 2017

anim.nim(4, 32) template/generic instantiation from here
anim.nim(6, 10) Error: type mismatch: got (Future[system.string]) but expected 'string'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment