* fixes #7842 if no uri.scheme specified on request rais ValueError with hint Signed-off-by: enthus1ast <david@code0.xyz> * Update httpclient.nim
This commit is contained in:
parent
4362ba7293
commit
f2cd8ed99a
1 changed files with 3 additions and 0 deletions
|
|
@ -1164,6 +1164,9 @@ proc requestAux(client: HttpClient | AsyncHttpClient, url: string,
|
||||||
# Helper that actually makes the request. Does not handle redirects.
|
# Helper that actually makes the request. Does not handle redirects.
|
||||||
let requestUrl = parseUri(url)
|
let requestUrl = parseUri(url)
|
||||||
|
|
||||||
|
if requestUrl.scheme == "":
|
||||||
|
raise newException(ValueError, "No uri scheme supplied.")
|
||||||
|
|
||||||
when client is AsyncHttpClient:
|
when client is AsyncHttpClient:
|
||||||
if not client.parseBodyFut.isNil:
|
if not client.parseBodyFut.isNil:
|
||||||
# let the current operation finish before making another request
|
# let the current operation finish before making another request
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue