I am using curlpp to receive the response. I am referring this example of curlpp site http://curlpp.org/index.php/examples/64-example-14. But I am not getting where the response is stored so that I can use it for further purpose. The code is only showing the integer values of status of the request. I have gone through google also but not able to figure it out.
curlpp::Multi::Msgs msgs = requests.info();
for (curlpp::Multi::Msgs::iterator pos = msgs.begin(); pos != msgs.end(); pos++)
{
if (pos->second.msg == CURLMSG_DONE)
{
/* Find out which handle this message is about */
if (pos->first == &request1)
{
printf("First request completed with status %d\n", pos->second.code);
}
else if (pos->first == &request2)
{
printf("Second request completed with status %d\n", pos->second.code);
}
}
You can specify other streams with the option WriteStream:
std::stringstream result;
request.setOpt(cURLpp::Options::WriteStream(&result));
request.perform();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With