0

I'm trying to learn how to use curlpp to send http requests in C++. So far the examples on their own work fine, but I'm trying to save the result into a std::string variable using stringstreams. The code looks like this:

31                 std::stringstream result;
39                 request.perform();
40 
41                 result << request;
42                 std::string jsonstring;
43                 result >> jsonstring;
44                 std::cout << jsonstring << "\n";

But the the result only returns a portion of the actual string This is ./a.out should look like:

{"mrpickie":{"id":25755422,"name":"Mr PickIe","profileIconId":19,"summonerLevel":30,"revisionDate":1454122204000}}

This is what it looks like:

{"mrpickie":{"id":25755422,"name":"Mr

What's up with that? I'm new to C++, so I imagine it has something to do with how I'm using stringstreams or declaring my string variable. If you want any more lines from my code I'd have no problem sharing

Thanks in advance

0 Answers0