comparison Core/HttpClient.cpp @ 3160:fc9a4a2dad63

merge
author Alain Mazy <alain@mazy.be>
date Thu, 24 Jan 2019 10:55:19 +0100
parents df4f977c2f88
children 7569d3dc1c20
comparison
equal deleted inserted replaced
3159:4cfed5c2eacd 3160:fc9a4a2dad63
60 code = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, status); 60 code = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, status);
61 return code; 61 return code;
62 } 62 }
63 else 63 else
64 { 64 {
65 LOG(ERROR) << "Error code " << static_cast<int>(code)
66 << " in libcurl: " << curl_easy_strerror(code);
65 *status = 0; 67 *status = 0;
66 return code; 68 return code;
67 } 69 }
68 } 70 }
69 71
693 buffer.Flatten(answerBody); 695 buffer.Flatten(answerBody);
694 } 696 }
695 else 697 else
696 { 698 {
697 answerBody.clear(); 699 answerBody.clear();
698 LOG(INFO) << "Error in HTTP request, received HTTP status " << status 700 LOG(ERROR) << "Error in HTTP request, received HTTP status " << status
699 << " (" << EnumerationToString(lastStatus_) << ")"; 701 << " (" << EnumerationToString(lastStatus_) << ")";
700 } 702 }
701 703
702 return success; 704 return success;
703 } 705 }
704 706