cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP header field extract

From: Manju Dash <manju.dash_at_gmail.com>
Date: Tue, 14 Nov 2006 09:13:36 -0600

Thanks you Sir for your help.
I used the call back function (WriteMemoryCallback)to extract the field. I
could extract the the 'Date' and 'Expire' field inside the function. I had
to set

curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);

insted of using

curl_easy_setopt(curl_handle, CURLOPT_HEADERFUNCTION, WriteMemoryCallback);

The CURLOPT_HEADERFUNCTION option could only get 1 line as HTTP/1.1 200 OK

so is it ok to use CURLOPT_WRITEFUNCTION instead CURLOPT_HEADERFUNCTION .

Please let me know the difference between these two.

Thanks

Manju
On 11/10/06, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Fri, 10 Nov 2006, Manju Dash wrote:
>
> > I want to extract the HTTP headers to get the 'Date' and 'Expires' field
> > values, please somebody help me in this
>
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTHEADERFUNCTION
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2006-11-14