From 47d673e50ac035b427baf157aae4540e5fd5488c Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sun, 31 Mar 2024 14:46:41 +0200 Subject: [PATCH] Minor cleanup --- src/requester.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/requester.cpp b/src/requester.cpp index 7893c39..9218a53 100644 --- a/src/requester.cpp +++ b/src/requester.cpp @@ -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()}; } }