Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: How to simply read a stream into a string?

$
0
0
I'm now trying the following, which crashes outright while trying to read a zero memory location:

``` http_client client(U("http://activemesa.com"));

auto task = client.request(methods::GET)
.then([=](http_response resp)
{
if (resp.status_code() == status_codes::OK)
{
  auto body = resp.extract_string().get();
  std::wcout << body;
}
});
task.wait();```

Viewing all articles
Browse latest Browse all 4845


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>