summary refs log tree commit diff stats
path: root/lib/pure/httpclient.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-09-12 22:54:02 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2014-09-12 22:54:02 +0100
commit6f155af802bec7dc1b4b8ff31e0135dd6692a93c (patch)
treee15bff0975c43f048a6c3a06b3831c28e81d4649 /lib/pure/httpclient.nim
parent950078003767de36132f179ca00d8c81dbcc162a (diff)
downloadNim-6f155af802bec7dc1b4b8ff31e0135dd6692a93c.tar.gz
Lots of documentation improvements for asyncdispatch.
Ref #1487.
Diffstat (limited to 'lib/pure/httpclient.nim')
-rw-r--r--lib/pure/httpclient.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim
index 1548cf231..892ddac40 100644
--- a/lib/pure/httpclient.nim
+++ b/lib/pure/httpclient.nim
@@ -48,6 +48,19 @@
 ##    
 ##   echo(postContent("http://validator.w3.org/check", headers, body))
 ##
+## Asynchronous HTTP requests
+## ==========================
+##
+## You simply have to create a new instance of the ``AsyncHttpClient`` object.
+## You may then use ``await`` on the functions defined for that object.
+## Keep in mind that the following code needs to be inside an asynchronous
+## procedure.
+##
+## .. code-block::nim
+##
+##    var client = newAsyncHttpClient()
+##    var resp = await client.request("http://google.com")
+##
 ## SSL/TLS support
 ## ===============
 ## This requires the OpenSSL library, fortunately it's widely used and installed