发送post请求代码如下:
#include
#include
#include
using namespace std;
//get请求和...post请求数据响应函数
size_t req_reply(void *ptr, size_t size, size_t nmemb, void *stream)
{
//在注释的里面可以打印请求流...x-www-form-urlencoded; charset=UTF-8");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list);
//不接收响应头数据...curl_easy_setopt(curl, CURLOPT_VERBOSE, 0);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, NULL);
//设置数据接收和写入函数...res3 = curl_post_req(url_post0, paramsLogin0, resPost0);
if (res3 == CURLE_OK)
{
cout << resPost0