环境:ubuntu1804 c/c++
ubuntu下安装curl4
apt-get install libcurl4-openssl-dev
踩过一个坑:
调用下面函数的时候:
string str_date;
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, str_date.c_str());
如果最后一个参数没有加上.c_str()的话,
编译也是能够通过的,但是对端接收到内容的时候会有编码问题
环境:ubuntu1804 c/c++
ubuntu下安装curl4
apt-get install libcurl4-openssl-dev
踩过一个坑:
调用下面函数的时候:
string str_date;
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, str_date.c_str());
如果最后一个参数没有加上.c_str()的话,
编译也是能够通过的,但是对端接收到内容的时候会有编码问题