cURL / Mailing Lists / curl-library / Single Mail

curl-library

Writing response to a buffer

From: Teresa Thomas <tere.ertw_at_gmail.com>
Date: Thu, 3 Aug 2006 01:46:59 -0400

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?

Thanks!
Received on 2006-08-03