以下是代码(从现有应用程序中提取):
这里是代码(从现有应用程序中提取):
CURL *curl = curl_easy_init();
_ASSERTE(curl);
string url = "http://127.0.0.1:8000/";
char *data = "mode=test";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
curl_easy_setopt(curl, CURLOPT_URL, url);
CURLcode res = curl_easy_perform(curl);
bool success = (res == CURLE_OK);
curl_easy_cleanup(curl);
< p > < code > res 的值是 < code > CURLE_URL_MALFORMAT 。这个URL是否不兼容curl?< /p >