download
suspend fun HttpClient.download(request: HttpRequest, destination: File, onProgress: (Double) -> Unit = {}): Try<HttpResponse, HttpDownloadError>
Downloads the resource from the given request to the destination file.
Parameters
request
The HttpRequest detailing the resource to be downloaded.
destination
The File where the downloaded resource should be saved.
onProgress
A closure called regularly with the download progress, from 0.0 to 1.0.