cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP HEADER

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 26 Feb 2008 13:33:47 +0100 (CET)

On Tue, 26 Feb 2008, Ramprakash Jelari thinakaran wrote:

> Is there any way to read out value of specific header element given by
> server, at the client end?.
> For example
>
> Server adds MYCODE: with the value "ABCD".
> How do i read at the client side?. is there any api where i can specify the
> element name so that i get the value?.

Yeps, you set a header callback with CURLOPT_HEADERFUNCTION and then you
compare each header for the one(s) you're interested in. You'll get each
header once and libcurl will make sure you get the full header in the
callback.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-02-26