summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorDavid Krause <enthus1ast@users.noreply.github.com>2018-04-25 16:06:53 +0200
committerGitHub <noreply@github.com>2018-04-25 16:06:53 +0200
commitbe8ce30acdd9d0cfad2cce605e1d738537dd7c12 (patch)
tree8e7dfde5dd5fcd627c9f0216d377d9e378103afa /lib
parente931f3b5a9643e0d7ac45b88b0bddb32dda4c540 (diff)
downloadNim-be8ce30acdd9d0cfad2cce605e1d738537dd7c12.tar.gz
copy pastable progress reporting example
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/httpclient.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim
index 70fb19434..0aa75dcfb 100644
--- a/lib/pure/httpclient.nim
+++ b/lib/pure/httpclient.nim
@@ -73,12 +73,13 @@
 ## progress of the HTTP request.
 ##
 ## .. code-block:: Nim
+##    import asyncdispatch, httpclient
 ##    var client = newAsyncHttpClient()
 ##    proc onProgressChanged(total, progress, speed: BiggestInt) {.async.} =
 ##      echo("Downloaded ", progress, " of ", total)
 ##      echo("Current rate: ", speed div 1000, "kb/s")
 ##    client.onProgressChanged = onProgressChanged
-##    discard await client.getContent("http://speedtest-ams2.digitalocean.com/100mb.test")
+##    discard waitFor client.getContent("http://speedtest-ams2.digitalocean.com/100mb.test")
 ##
 ## If you would like to remove the callback simply set it to ``nil``.
 ##