发送post请求代码如下:
#include
#include
#include
using namespace std;
//get请求和...post请求数据响应函数
size_t req_reply(void *ptr, size_t size, size_t nmemb, void *stream)
{
//在注释的里面可以打印请求流...请求
CURLcode curl_post_req(const string &url, const string &postParams, string &response)
{
//...post请求
curl_easy_setopt(curl, CURLOPT_POST, 1);
//设置请求的URL地址
curl_easy_setopt(curl, CURLOPT_URL..., url.c_str());
//设置post请求的参数
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postParams.c_str());