cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: pulling HTTP status code out of response

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 28 Jan 2003 20:25:51 +0100 (CET)

On Tue, 28 Jan 2003, Jami Amore wrote:

> Sorry for the delay in my response. This does work after all...it was a
> user error on my part.

Ah, good.

> X-More-Data: N
> X-Data-Source: ESI
> X-Total-Records: 5
> Connection: Close
>
> I need to access the X-Total-Records field, which appears to be a field
> created/used by the particular data source I am accessing. Is there a way
> in curl to access that type of header information (application specific)?

Yes. You use the CURLOPT_HEADERFUNCTION option to set a callback, and then
your function will be called with each header, one by one, and you compare to
see if the header is interesting and if it is, you parse out the values etc.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-01-28