From b3743b6cee0c9befdb8e1c60a35029c741443371 Mon Sep 17 00:00:00 2001 From: KovalenkoDM Date: Mon, 27 May 2024 13:46:09 +0300 Subject: [PATCH] work with CURL --- main_original.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_original.cpp b/main_original.cpp index b445710..1d25a1e 100644 --- a/main_original.cpp +++ b/main_original.cpp @@ -40,7 +40,6 @@ Input download(const string& address) { if (curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, address.c_str()); - curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer); res = curl_easy_perform(curl); @@ -51,7 +50,8 @@ Input download(const string& address) { auto data = curl_version_info(CURLVERSION_NOW)->protocols; for (auto protocol = data; *protocol; ++protocol) { cerr << *protocol << endl; - } curl_easy_cleanup(curl); + } + curl_easy_cleanup(curl); } return input_data(buffer); }