summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2016-09-18 22:59:12 +0200
committerDominik Picheta <dominikpicheta@gmail.com>2016-09-18 22:59:12 +0200
commit8386476592a1fafea7f62d18604ac8534f9b1834 (patch)
tree146ac4a257c2a48f3c66b30325c01fa6253fc122 /tests/stdlib
parent0c99523ad314433538df44c734cdf987c6c4337e (diff)
downloadNim-8386476592a1fafea7f62d18604ac8534f9b1834.tar.gz
Implements proxy support for (Async)HttpClient. Ref #4423.
Fixes #2160.
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/thttpclient.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/stdlib/thttpclient.nim b/tests/stdlib/thttpclient.nim
index b5daa963a..d0cf25b45 100644
--- a/tests/stdlib/thttpclient.nim
+++ b/tests/stdlib/thttpclient.nim
@@ -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()