0
C使用的libcurl curl_easy_perform交,空格和點由下劃線C使用的libcurl curl_easy_perform交,空格和點取代下劃線
的代碼是如下面的例子所取代。
在對方接收到的數據是錯誤的:
期待:<Text>data to send...</Text>
其實:<Text>data_to_send___</Text>
CURL *curl = curl_easy_init();
if(curl) {
const char *data = "<Text>data to send...</Text>";
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
}
有誰知道原因嗎?
感謝您的答覆,是的,你是對的,那是因爲我沒設置的HTTPHeader,但目的只接受XML! !所以這個問題發生了! – Jason