readBytes does not read bytes one by one but in chunks

This commit is contained in:
Benjamin Sergeant
2019-03-02 21:11:16 -08:00
parent a9e772f330
commit 0c226c7629
7 changed files with 49 additions and 49 deletions

View File

@ -107,6 +107,12 @@ namespace ix
{
std::cout << msg;
};
args.onProgressCallback = [](int current, int total) -> bool
{
std::cerr << "\r" << "Downloaded "
<< current << " bytes out of " << total;
return true;
};
HttpParameters httpParameters = parsePostParameters(data);
@ -125,6 +131,8 @@ namespace ix
out = httpClient.post(url, httpParameters, args);
}
std::cerr << std::endl;
auto statusCode = std::get<0>(out);
auto errorCode = std::get<1>(out);
auto responseHeaders = std::get<2>(out);