C++环境,如何保存http的post回应消息,post部分使用了curl库

函数主体如下:

#include<curl\curl.h>
int main()
{
CURL *hnd = curl_easy_init();

    curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(hnd, CURLOPT_URL, "api.thingspeak.com/talkbacks/14072/commands/execute.json");

    struct curl_slist *headers = NULL;
    headers = curl_slist_append(headers, "content-type: application/x-www-form-urlencoded");
    headers = curl_slist_append(headers, "postman-token: 4fdca9ae-9b34-6525-cca4-3f59776fe95e");
    headers = curl_slist_append(headers, "cache-control: no-cache");
    curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "api_key=Q7S2VY3XG1KDLMNF");

    CURLcode ret = curl_easy_perform(hnd);


}

图片是运行结果,一个JSON对象,即回应信息,想问怎么保存下这个信息。求大神帮助。

图片说明

你说的保存是什么意思?是把返回值写入文本文件?
http://www.runoob.com/cprogramming/c-file-io.html

或者是c++解析json?
http://www.cnblogs.com/lidabo/archive/2012/10/31/2748026.html

看看这个:
http://blog.csdn.net/wzx19840423/article/details/6587370

设置回调函数和返回buffer接住返回值:参考——http://blog.csdn.net/yyyiran/article/details/24775033