|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-08-18 16:14:52
on Fri Aug 17 2007, "Raja Cherukuri" <raja-AT-transerainc.com> wrote:
> Thanks it works fine...how do check the return response...
> Using extract<string> or <extract<char*> doesn't seem to help..
What does it do?
> Am I doing something wrong ?
You might try to figure out what's in response by printing it. Maybe
respose["result"] is not a string, or else maybe it's unicode...
> Here is the code:
>
> boost::python::object response =
> gpPythonHttp->attr("urlopen")(m_sURI.c_str(),strXMLOutput.c_str());
> boost::python::exec("result = read()", response);
> std::string res =
> boost::python::extract<std::string>(response["result"]);
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net