diff --git a/app/src/main/cpp/netcamera/httpclient.cpp b/app/src/main/cpp/netcamera/httpclient.cpp index d09ffa0d..042d1a33 100644 --- a/app/src/main/cpp/netcamera/httpclient.cpp +++ b/app/src/main/cpp/netcamera/httpclient.cpp @@ -65,6 +65,8 @@ int DoGetRequest(const char* url, int authType, const char* userName, const char curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &netHandle); } + curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); + curl_easy_setopt(curl, CURLOPT_USERAGENT , "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36"); // curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, OnWriteData); // 设置回调函数的参数,获取反馈信息