diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-09-12 22:54:02 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-09-12 22:54:02 +0100 |
commit | 6f155af802bec7dc1b4b8ff31e0135dd6692a93c (patch) | |
tree | e15bff0975c43f048a6c3a06b3831c28e81d4649 /lib/pure/httpclient.nim | |
parent | 950078003767de36132f179ca00d8c81dbcc162a (diff) | |
download | Nim-6f155af802bec7dc1b4b8ff31e0135dd6692a93c.tar.gz |
Lots of documentation improvements for asyncdispatch.
Ref #1487.
Diffstat (limited to 'lib/pure/httpclient.nim')
-rw-r--r-- | lib/pure/httpclient.nim | 13 |
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 |