comparison Core/HttpClient.cpp @ 3122:df4f977c2f88

trying to reproduce isse 32 in C++
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 15 Jan 2019 13:06:03 +0100
parents 0e75026a2c02
children 7569d3dc1c20
comparison
equal deleted inserted replaced
3119:8f2bda0719f4 3122:df4f977c2f88
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(INFO) << "Error code " << static_cast<int>(code) 65 LOG(ERROR) << "Error code " << static_cast<int>(code)
66 << " in libcurl: " << curl_easy_strerror(code); 66 << " in libcurl: " << curl_easy_strerror(code);
67 *status = 0; 67 *status = 0;
68 return code; 68 return code;
69 } 69 }
70 } 70 }
71 71
695 buffer.Flatten(answerBody); 695 buffer.Flatten(answerBody);
696 } 696 }
697 else 697 else
698 { 698 {
699 answerBody.clear(); 699 answerBody.clear();
700 LOG(INFO) << "Error in HTTP request, received HTTP status " << status 700 LOG(ERROR) << "Error in HTTP request, received HTTP status " << status
701 << " (" << EnumerationToString(lastStatus_) << ")"; 701 << " (" << EnumerationToString(lastStatus_) << ")";
702 } 702 }
703 703
704 return success; 704 return success;
705 } 705 }
706 706