(Refer http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)
Using the C libcurl requires you to set the curl option CURLOPT_WRITEDATA passing in a FILE*. Or else it will simply output the response received to stdout. Seems one is then forced to use temporary files just for reading responses, and there is no way to read response directly into a memory buffer. It looks very sh!tty and very hard to believe. Php curl has better interfaces. Is this one should live with while using C libcurl? It gets messier still when using curl multi handles, as we have to use multiple temporary files then.
Please clarify before I shoot myself.
(Refer http://curl.haxx.se/libcurl/c/curl_easy_setopt.html ) Using the C libcurl requires you to set the curl option
Share
This has been asked and answered a millions times before. Here’s an example how to do it:
http://curl.haxx.se/libcurl/c/getinmemory.html