cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How can i get the answer from a post ?

From: Joe N. <jnardone_at_gmail.com>
Date: Sun, 27 Jul 2008 11:41:47 -0400

> static size_t write_to_buffer(void *ptr, size_t size, size_t nmemb, void
> *stream)
> {
> if (stream == NULL)
> return 0;
>
> ((std::string *) stream)->append((const char *)ptr,size * nmemb);
> return size * nmemb;
>
> }
> and according to the samples (examples) it is preety close to it.
>
>

What did you pass in to CURL_WRITEDATA as "buffer"? In this example it
should be a std::string, which you should be able to reference once
curl_easy_perform is done.

Joe
Received on 2008-07-27