diff options
author | Tristram Oaten <tristram@oaten.name> | 2020-04-20 17:44:25 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2020-04-21 00:00:30 +0100 |
commit | 42a64245f81c1975845f1f4e8018f97ef350c153 (patch) | |
tree | 35e479b957473da8fdbc5c620d7885674fbcb5b8 /compiler/ndi.nim | |
parent | 67d71bb76d4c3d78302a452623d4507c783c6cc9 (diff) | |
download | Nim-42a64245f81c1975845f1f4e8018f97ef350c153.tar.gz |
Fix broken async httpclient example
As the async httpclient is almost certainly the first async example beginners will want to try, we OWE it to them to give them a real example. Example repeated here for clarity: ```nim import asyncdispatch, httpclient proc asyncProc(): Future[string] {.async.} = var client = newAsyncHttpClient() return await client.getContent("http://example.com") echo waitFor asyncProc() ``` This is my first Nim contribution, please let me know if the code is right. (it runs on my machine, but may not be the best example)
Diffstat (limited to 'compiler/ndi.nim')
0 files changed, 0 insertions, 0 deletions