curl-library
Re: How to recieve header and body text into string buffer without printout
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 17 Oct 2008 09:32:38 +0200 (CEST)
Date: Fri, 17 Oct 2008 09:32:38 +0200 (CEST)
On Fri, 17 Oct 2008, ??? wrote:
> i want to header and body text not to be printed out.
>
> size_t receiveData(void *ptr, size_t size, size_t nmemb, void *stream)
> {
> // do something.
>
> return size;
> }
This should return size * nmemb.
> curl_easy_setopt(hCurl, CURLOPT_HEADERFUNCTION, receiveData);
> curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, receiveData);
In what way doesn't this work then?
> curl_easy_setopt(hCurl, CURLOPT_WRITEHEADER, stdout);
> curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, stdout);
It seems odd to pass stdout like this to your callbacks...
-- / daniel.haxx.seReceived on 2008-10-17