Http Client Tutorial not working: "Concurrency::streams::basic_istream<uint8_t>" has no member "read_to_end"

Jun 11, 2014 at 12:40 AM
Edited Jun 11, 2014 at 12:41 AM
Hi,

I'm new to the C++ REST SDK and I've been following the Http Client Tutorial (https://casablanca.codeplex.com/wikipage?title=Http%20Client%20Tutorial). I've installed Casablanca 2.0.1, and I've tried the bingrequest.cpp from the source code and I keep getting an error saying that:

IntelliSense: class "Concurrency::streams::basic_istream<uint8_t>" has no member "read_to_end"
IntelliSense: cannot open source file "boost/algorithm/string/predicate.hpp"

and a series of,

IntelliSense: identifier "utf16char" is undefined.

I've been trying to find an answer - but I can't seem to find any on the discussions. Please advise.

Thanks.

P.S. I'm using Visual Studio 2013.
Jun 11, 2014 at 10:06 AM
Example usage. This compiles ok. I'm not sure if it's logically correct.
    web::http::http_response response(web::http::status_codes::OK);
    response.body().read_to_end(Concurrency::streams::streambuf<uint8_t>()).wait();
Jun 12, 2014 at 12:09 AM
Ok - I've managed to run the tutorial now. The tutorial works. Part of the reason why mine didn't work was because I forgot to install Boost and also in Visual Studio 2013, I had selected New Project > General > Empty Project instead of New Project > Win32 > Win32 Console Application.

Thanks for all the help!
Marked as answer by awong on 6/11/2014 at 4:09 PM
Coordinator
Jun 12, 2014 at 2:42 AM
Hi awong,

We've fixed up the issue with empty projects now in our development branch. You shouldn't have any problems any more. We were checking a wrong macro before.

Thanks,
Steve