From cea20d4078f2088dea0dd589f1cc9dd7ee22461b Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Wed, 4 Jul 2018 22:43:01 +0300 Subject: Remove error on bad http request. It is handled by Api. --- src/net/HttpClient.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/net') diff --git a/src/net/HttpClient.cpp b/src/net/HttpClient.cpp index a72890f..528d988 100644 --- a/src/net/HttpClient.cpp +++ b/src/net/HttpClient.cpp @@ -145,8 +145,6 @@ string CurlHttpClient::makeRequest(const Url& url, const vector& arg curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_string); auto res = curl_easy_perform(curl); - long http_code; - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code); curl_slist_free_all(headers); curl_easy_cleanup(curl); @@ -155,8 +153,6 @@ string CurlHttpClient::makeRequest(const Url& url, const vector& arg if (res != CURLE_OK) throw std::runtime_error(std::string("curl error: ") + curl_easy_strerror(res)); - if (http_code != 200) - throw std::runtime_error("http request returned with code = " + std::to_string(http_code)); return HttpParser::getInstance().parseResponse(response); } -- cgit v1.2.3