summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorEgor Pugin <egor.pugin@gmail.com>2018-07-04 22:43:01 +0300
committerEgor Pugin <egor.pugin@gmail.com>2018-07-04 22:43:01 +0300
commitcea20d4078f2088dea0dd589f1cc9dd7ee22461b (patch)
tree0988a53694ba9cbc8f1ed8f121b3a72c56521f26 /src/net
parent06e50ae4f2392adc1b670f2c05b8f016f63fea7a (diff)
Remove error on bad http request. It is handled by Api.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/HttpClient.cpp4
1 files changed, 0 insertions, 4 deletions
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<HttpReqArg>& 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<HttpReqArg>& 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);
}