add DEBUG switch and fix win build error

This commit is contained in:
zhangzifa
2019-02-21 11:20:28 +08:00
committed by TonyZZF
parent 6a5f788210
commit eb7ab33440
7 changed files with 65 additions and 13 deletions

View File

@@ -15,6 +15,7 @@
*/
#include "CurlHttpClient.h"
#include "Utils.h"
#include <cassert>
#include <sstream>
#include <string>
@@ -124,6 +125,10 @@ CurlHttpClient::makeRequest(const HttpRequest &request) {
curl_easy_setopt(curlHandle_, CURLOPT_WRITEFUNCTION, recvBody);
setCUrlProxy(curlHandle_, proxy());
if (GetEnv("DEBUG") == "sdk") {
curl_easy_setopt(curlHandle_, CURLOPT_VERBOSE, 1L);
}
CURLcode res = curl_easy_perform(curlHandle_);
switch (res) {
case CURLE_OK: {