curl-library
Re: About receiving data
Date: Wed, 2 Apr 2008 16:34:03 +0200 (CEST)
On Wed, 2 Apr 2008, Prasad J Pandit wrote:
>> You seem to have missed the tutorial:
>
> Ummn..no I didn't. And to be honest, it is not very well written,
Then I'm looking forward to see your improvements.
> I must say. For ex. the space where it explains about CURLOPT_WRITEDATA as
> bellow, nowhere could I find, what this `internal_struct' is? There are many
> such quirks.
>
> curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, &internal_struct);
Yes it actually assumes that you have done some amount of programming before,
it's not an entry-level document. The pointer you set with CURLOPT_WRITEDATA
is passed verbatim to the write callback. You can pass a pointer to anything
you like.
> Well, I did have a look at this link below, and again couldn't find
> write_data example.
>
> http://curl.haxx.se/lxr/source/docs/examples/
getinmemory.c perhaps?
> Also the Post-callback.c explains about how to read_data from external
> source before doing post.
>
> http://curl.haxx.se/lxr/source/docs/examples/post-callback.c
That shows how to use the read callback when doing a POST, yes.
> Anyways, IMHO I think, it's still far from being called sane.
Can you please elaborate on how that example isn't sane?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2008-04-02