Implements proxy support for (Async)HttpClient. Ref #4423.

Fixes #2160.
This commit is contained in:
Dominik Picheta 2016-09-18 22:59:12 +02:00
commit 8386476592
3 changed files with 84 additions and 18 deletions

View file

@ -16,6 +16,12 @@ proc asyncTest() {.async.} =
resp = await client.request("https://google.com/")
doAssert(resp.code.is2xx or resp.code.is3xx)
client.close()
# Proxy test
#client = newAsyncHttpClient(proxy = newProxy("http://51.254.106.76:80/"))
#var resp = await client.request("https://github.com")
#echo resp
proc syncTest() =
var client = newHttpClient()