Ifvwm
01/14/2021, 5:52 AMval client = HttpClient(CIO) {
followRedirects = false
}
val _result = client.get<HttpResponse>(addr)
val readInputStream = client.get<InputStream>(_result.headers["LOCATION"]?:"")
// val count = client.get<HttpResponse>(_result.headers["LOCATION"]?:"")
the comment line would take 20 secondsgildor
01/14/2021, 6:26 AMRustam Siniukov
01/14/2021, 11:48 AMclient.get<HttpResponse>
downloads and saves in memory body of the response. If you don’t need it, use client.get<HttpStatement>().execute { /* you can read body here */ }