Fwd: to get the response received

18 views
Skip to first unread message

Rajbir Kaur

unread,
Jun 19, 2011, 2:34:41 AM6/19/11
to cur...@googlegroups.com
Hi,
Please help me. Its urgent. I want to know where the response that is received by curlpp is stored in curlpp::Multi::Msg. I have gone through curlpp examples and google also, but not able to find.
Or I have to use the callback function only.

Thanks in advance

 
---------- Forwarded message ----------
From: Rajbir Kaur <rajb...@gmail.com>
Date: Fri, Jun 17, 2011 at 2:54 PM
Subject: to get the response received
To: cur...@googlegroups.com


Hi,
I am using curlpp in my project. I have gone through the examples given on the.
Now I am taking the reference of example 14.
My Requirement: to save the data received from the remote url and use it for further purpose.
Problem is I am not getting where the received data is stored in the CURLMsg structure:
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);
  }
      }

Rajbir Kaur

unread,
Jun 17, 2011, 5:24:56 AM6/17/11
to cur...@googlegroups.com

Jean-Philippe Barette-LaPierre

unread,
Jun 19, 2011, 12:23:44 PM6/19/11
to cur...@googlegroups.com
Look at example 22 (Using options::Url as stream input).

> --
> You received this message because you are subscribed to the Google Groups
> "curlpp" group.
> To post to this group, send email to cur...@googlegroups.com.
> To unsubscribe from this group, send email to
> curlpp+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/curlpp?hl=en.
>

Reply all
Reply to author
Forward
0 new messages