mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
@@ -57,8 +57,9 @@ proc asyncTest() {.async.} =
|
||||
doAssert(resp.code == Http404)
|
||||
doAssert(resp.status == $Http404)
|
||||
|
||||
resp = await client.request("https://google.com/")
|
||||
doAssert(resp.code.is2xx or resp.code.is3xx)
|
||||
when false: # occasionally does not give success code
|
||||
resp = await client.request("https://google.com/")
|
||||
doAssert(resp.code.is2xx or resp.code.is3xx)
|
||||
|
||||
# getContent
|
||||
try:
|
||||
@@ -118,8 +119,9 @@ proc syncTest() =
|
||||
doAssert(resp.code == Http404)
|
||||
doAssert(resp.status == $Http404)
|
||||
|
||||
resp = client.request("https://google.com/")
|
||||
doAssert(resp.code.is2xx or resp.code.is3xx)
|
||||
when false: # occasionally does not give success code
|
||||
resp = client.request("https://google.com/")
|
||||
doAssert(resp.code.is2xx or resp.code.is3xx)
|
||||
|
||||
# getContent
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user