Minor cleanup
This commit is contained in:
parent
8a7f92179d
commit
47d673e50a
@ -43,7 +43,6 @@ requester& requester::operator=(requester&& other) {
|
||||
}
|
||||
|
||||
std::string requester::get(const std::string &url) {
|
||||
_text = "";
|
||||
curl_easy_setopt(_h.get(), CURLOPT_URL, url.c_str());
|
||||
perform();
|
||||
check_status(200);
|
||||
@ -79,7 +78,7 @@ void requester::check_status(long status) {
|
||||
auto success = curl_easy_getinfo(_h.get(), CURLINFO_RESPONSE_CODE, &_status);
|
||||
if (success != CURLE_OK || _status != status) {
|
||||
std::ostringstream oss;
|
||||
oss << "could not get remote data (" << _status << ")";
|
||||
oss << "unexpected status: " << _status;
|
||||
throw std::runtime_error {oss.str()};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user