Thread
:
What Is The Use Of libconic Api And How libconic and curl Http Are realted
View Single Post
lardman
2009-11-20 , 09:01
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#
3
yes, libconic is used to handle connections (setup, switch, shutdown). It has nothing to do with curl. For curl you do something like this:
CURL *curl;
CURLcode res;
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&resultchunk);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_writebuffer);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
Obviously you'll want some error checking in there too
Quote & Reply
|
The Following User Says Thank You to lardman For This Useful Post:
qwerty12
lardman
View Public Profile
Send a private message to lardman
Find all posts by lardman