dimanche 3 mars 2019

why does http client PUT request is so slow in cpr c++ library ? it takes 8 sec to send 1 MB file , is that Normal?

cpr - C++ Request

this is a sample code of sending a file through put request using cpr

auto url = cpr::Url{"PUT_api_url"};
auto t1 = time(nullptr);
auto response = cpr::Put(url,
                cpr::Body(file_str),
                cpr::HeaderContent-Type
            );
auto t2 = time(nullptr);
std::cout<<"network takes "<<t2-t1<<" sec."<<std::endl;

// prints network takes 8 sec.

Aucun commentaire:

Enregistrer un commentaire