This commit is contained in:
Dominik Picheta
2017-08-28 23:12:10 +01:00
parent a3f82a574f
commit b47e448e06

View File

@@ -1245,6 +1245,8 @@ proc downloadFile*(client: HttpClient | AsyncHttpClient,
url: string, filename: string): Future[void] {.multisync.} =
## Downloads ``url`` and saves it to ``filename``.
client.getBody = false
defer:
client.getBody = true
let resp = await client.get(url)
when client is HttpClient: