cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Writing response to a buffer

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 2 Aug 2006 23:17:08 -0700

On Thu, Aug 03, 2006 at 01:46:59AM -0400, Teresa Thomas wrote:
> Currently I am using the following code to obtain the HTTP responses into
> files:
>
> /* we want the headers and body to this file handle */
> curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER ,headerfile);
> curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA ,bodyfile);
>
> where headerfile and bodyfile are of type FILE*
>
> How can I redirect the (mainly the body) response to strings/character buffers?

This is FAQ #5.2: http://curlm.haxx.se/docs/faq.html#5.2

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-08-03