code: curl easy init
Этот коммит содержится в:
9
main.cpp
9
main.cpp
@@ -34,12 +34,15 @@ Input input_data(istream& in, bool prompt = true)
|
|||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
for (int i = 0; i > argc; i++) {
|
CURL *curl = curl_easy_init();
|
||||||
cout << "argv[" << i << "] = " << argv[i];
|
if(curl) {
|
||||||
|
CURLcode res;
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
curl_global_init(CURL_GLOBAL_ALL);
|
|
||||||
bool show_prompts;
|
bool show_prompts;
|
||||||
cout << "Show prompts? (1 for yes, 0 for no): ";
|
cout << "Show prompts? (1 for yes, 0 for no): ";
|
||||||
cin >> show_prompts;
|
cin >> show_prompts;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user