也就是CURLcode转string类型,网上百度了好久,都没有结果
代码如下
#include <iostream>
#include <string>
#include "curl/curl.h"
using namespace std;
int main()
{
system("chcp 65001");
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "www.anyuer.club");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Postman-Token: 0c5393e1-a955-4e62-a5ec-6658eadc57dd");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1);
CURLcode ret = curl_easy_perform(hnd);
string aa = curl_easy_perform(hnd);
while (1);
return 0;
}