curl/Easy: add Perform()

This commit is contained in:
Max Kellermann 2019-08-28 10:41:41 +02:00 committed by Max Kellermann
parent 29b542fd36
commit 409002b1c3

View File

@ -187,6 +187,12 @@ public:
: -1;
}
void Perform() {
CURLcode code = curl_easy_perform(handle);
if (code != CURLE_OK)
throw std::runtime_error(curl_easy_strerror(code));
}
bool Unpause() noexcept {
return ::curl_easy_pause(handle, CURLPAUSE_CONT) == CURLE_OK;
}