forked from HowardHinnant/date
Add User-Agent curl option in download_to_string function. [#438]
This commit is contained in:
committed by
Howard Hinnant
parent
081e9af55b
commit
429d9ba739
@@ -2810,6 +2810,7 @@ download_to_string(const std::string& url, std::string& str)
|
||||
if (!curl)
|
||||
return false;
|
||||
std::string version;
|
||||
curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, "curl");
|
||||
curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
|
||||
curl_write_callback write_cb = [](char* contents, std::size_t size, std::size_t nmemb,
|
||||
void* userp) -> std::size_t
|
||||
|
Reference in New Issue
Block a user