For saving the response header, you can register a header function call
back, something like:
cURLpp::Options::BoostHeaderFunction *headerFunctor =
new cURLpp::Options::BoostHeaderFunction(
boost::bind(&Fetcher::writeHeaderCallback,
this,
&m_handler,
_1, _2, _3));
m_handle.setOpt(headerFunctor);
The writeHeaderCallback function will be called once per line of the header.
Jeff Ye
> Hi,
>
>
>
> I'm new to this list, and new to cURLpp! I've made really good progress
> up to now, but I've found some issues using the Infos objects.
>
> Is this list always this quiet?
>
>
>
> On ubuntu 7.10, the examples that use Infos seg fault:
>
>
>
>
>
> ryan_at_Chomolunga:~/Downloads/curlpp-0.7.1/examples$ ./example04
> 172.27.50.130/102.html
>
> * About to connect() to 172.27.50.130 port 80 (#0)
>
> * Trying 172.27.50.130... * connected
>
> * Connected to 172.27.50.130 (172.27.50.130) port 80 (#0)
>
>> GET /102.html HTTP/1.1
>
> Host: 172.27.50.130
>
> Accept: */*
>
>
>
> < HTTP/1.1 200 OK
>
> < Date: Tue, 29 Jan 2008 00:13:32 GMT
>
> < Server: Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6
>
> < Last-Modified: Sat, 25 Feb 2006 00:09:09 GMT
>
> < ETag: "858041-69-495c9340"
>
> < Accept-Ranges: bytes
>
> < Content-Length: 105
>
> < Content-Type: text/html
>
> <
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
>
> <HTML>
>
> <HEAD>
>
> </HEAD>
>
> <BODY>
>
> </BODY>
>
> </HTML>
>
> * Connection #0 to host 172.27.50.130 left intact
>
> Effective URL:
>
>
>
> Effective URL:
>
> Response code: 200
>
> Segmentation fault (core dumped)
>
> ryan_at_Chomolunga:~/Downloads/curlpp-0.7.1/examples$
>
>
>
>
>
> Can someone provide the correct way to use this object, or are there
> bugs?
>
> Specifically, my application needs a way to capture the HTTP response
> headers. I also need a way to save the full HTTP request. Is there a
> way to do this? From reading the docs, it doesn't appear like there is.
>
>
>
> Thanks!
>
>
>
> -Ryan
>
>
>
>
>
> Ryan Allen | Sr. Software Engineer
>
> F5 Networks
>
> P 206.272.5555
>
> F 206.272.5556
>
> www.f5.com <http://www.f5.com>
>
> D 206.272.6538
>
>
>
>
>
>
>
> _______________________________________________
> cURLpp mailing list
> cURLpp_at_rrette.com
> http://www.rrette.com/mailman/listinfo/curlpp
>
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2008-01-29