Added convenience function Client::Response::Content::string()

This commit is contained in:
eidheim 2017-06-22 22:00:07 +02:00
commit 6b7fd993cf
5 changed files with 29 additions and 4 deletions

View file

@ -184,7 +184,7 @@ int main() {
// synchronous request examples
auto r1=client.request("GET", "/match/123");
cout << r1->content.rdbuf() << endl;
cout << r1->content.rdbuf() << endl; // Alternatively, use the convenience function r1->content.string()
string json_string="{\"firstName\": \"John\",\"lastName\": \"Smith\",\"age\": 25}";
auto r2=client.request("POST", "/string", json_string);