summaryrefslogtreecommitdiff
path: root/Source/Core/Common/HttpRequest.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-06-13 12:23:08 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-06-13 12:52:31 +0200
commit8f87433719c58c60df4cb514e9e0eb215fb65158 (patch)
tree9a9c774fb3387216fccd3272253da297e7dc7000 /Source/Core/Common/HttpRequest.cpp
parent18678afa6de918a17800a27dfc85027eb717facd (diff)
HttpRequest: Log response body on failure
Diffstat (limited to 'Source/Core/Common/HttpRequest.cpp')
-rw-r--r--Source/Core/Common/HttpRequest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/HttpRequest.cpp b/Source/Core/Common/HttpRequest.cpp
index 68b5036ee9..0f4c1695d1 100644
--- a/Source/Core/Common/HttpRequest.cpp
+++ b/Source/Core/Common/HttpRequest.cpp
@@ -111,7 +111,8 @@ HttpRequest::Response HttpRequest::Impl::Fetch(const std::string& url, Method me
curl_easy_getinfo(m_curl.get(), CURLINFO_RESPONSE_CODE, &response_code);
if (response_code != 200)
{
- ERROR_LOG(COMMON, "Failed to %s %s: response code was %li", type, url.c_str(), response_code);
+ ERROR_LOG(COMMON, "Failed to %s %s: server replied with code %li and body\n\x1b[0m%s", type,
+ url.c_str(), response_code, buffer.data());
return {};
}