Implements proxy support for (Async)HttpClient. Ref #4423.
Fixes #2160.
This commit is contained in:
parent
0c99523ad3
commit
8386476592
3 changed files with 84 additions and 18 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue