#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://api.gugudata.com/ai/stock-financial-report-analysis");
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
headers = curl_slist_append(headers, "Authorization: Bearer YOUR_APPKEY");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\r\n \"symbol\": \"600000\",\r\n \"language\": \"zh-CN\",\r\n \"startYear\": \"2020\",\r\n \"includeNews\": true,\r\n \"includeFundFlow\": true\r\n}");
CURLcode res = curl_easy_perform(curl);
(void)res;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}