View Single Post
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
 

The Following User Says Thank You to lardman For This Useful Post: