how to get the response?

28 views
Skip to first unread message

Stéphane Charette

unread,
Feb 15, 2011, 2:56:36 PM2/15/11
to curlpp
I've got a curlpp::Easy object with all the necessary options to post
some XML to a HTTPS url. When I enable the verbose option I can see
the response go to STDOUT, so I know it is working.

But...how do I get access to that response programmatically? The
curlpp::Easy object doesn't seem to provide the response, so I'm
thinking I'm missing something really simple.

I would have thought curlpp::Easy::perform() would return an object,
but it returns void. Anyone?

Stéphane Charette

Jean-Philippe Barrette-LaPierre

unread,
Feb 16, 2011, 10:39:13 PM2/16/11
to curlpp
Example 22 shows how to use streams.

mostly:

Easy request;
request.SetOpt(Option::Url("curlpp.org"));

std::cout << request << endl;

will call perform on the request and stream it to std::cout.

The previous lines are a shorcut of example20.

I remember that I made some doc somewhere which was talking about
this, but it seems I can't find it...



On Feb 15, 2:56 pm, Stéphane Charette
Reply all
Reply to author
Forward
0 new messages