I'm trying to interface with the Google Contact API, and in order to update a contact on the remote side, I need to use a PUT request instead of POST.
Since the data I want to PUT is already in memory, I really don't want to deal with file pointers, which seems to be the default behavior of CURLOPT_READDATA. Thus, I understand I need to use CURLOPT_READFUNCTION in addition to that but I'm failing to understand the logic.
Here is the relevant doc: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTREADFUNCTION
Printing the variables passed in, I see nmemb=16372
and size=1
. If my data is going to be of size 100K, for example, what is the logic that I need to implement?
Thank you.