cURLpp: Trying to read an XML document from the web

232 Views Asked by At

I just started to play a bit around with cURLpp, and try to read a XML document from the web. Here is the site:

https://www.westlotto.com/wlinfo/WL_InfoService?gruppe=SpielplanToto

When I do a simple cURLpp operation:

try {
    curlpp::Cleanup myCleanup;
    curlpp::Easy myRequest;
    myRequest.setOpt<Url>("http://www.westlotto.com/wlinfo/WL_InfoService?gruppe=SpielplanToto");
    myRequest.perform();
}
catch(curlpp::RuntimeError & e) {
    ...
}

I get this document:

<html>
<title>Request Denied!</title>
<body><center><h1>Request Denied!</h1>
<p>www.westlotto.de</p>
<p>If you have any questions contact the admin.</p>
</center></body>
</html>

With the curl command line tool, it works fine. I have no idea what is going on and how to solve this.

Thanks!

0

There are 0 best solutions below