mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 20:47:53 +00:00
* 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:
committed by
Dominik Picheta
parent
4362ba7293
commit
f2cd8ed99a
@@ -1163,6 +1163,9 @@ proc requestAux(client: HttpClient | AsyncHttpClient, url: string,
|
||||
{.multisync.} =
|
||||
# Helper that actually makes the request. Does not handle redirects.
|
||||
let requestUrl = parseUri(url)
|
||||
|
||||
if requestUrl.scheme == "":
|
||||
raise newException(ValueError, "No uri scheme supplied.")
|
||||
|
||||
when client is AsyncHttpClient:
|
||||
if not client.parseBodyFut.isNil:
|
||||
|
||||
Reference in New Issue
Block a user