curl-library
Re: API for getting header
Date: Wed, 17 Sep 2003 21:04:38 -0700
> On Wed, 17 Sep 2003 jerry_at_oridus.com wrote:
> > I only know we can use curl_slist_append( ) to customize my own header for
> > requests but another way around, does libcurl have any API to let us get
> > header fields from response returned by http server?
>
> Yes it has. CURLOPT_HEADERFUNCTION is the option you want.
>
> This is described in the tutorial.
Hi Daniel,
do we need to do something like this after CURLOPT_HEADERFUNCTION?
curl_easy_setopt(m_curlHandle, CURLOPT_FILE, (void *)myAppData); // for retrive header
I don't know whether it is the right one to use for CURLOPT_HEADERFUNCTION ( sorry, I don't see it is mentioned in document )
and, the ptr ( 1st parameter ) passed into CURLOPT_HEADERFUNCTION is (char *)?
Regds,
- Jerry
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-18