Added Client::request stream content test as suggested in #87

This commit is contained in:
eidheim 2016-11-23 12:24:55 +01:00
commit 74d7ca0cdb

View file

@ -47,6 +47,14 @@ int main() {
assert(output.str()=="A string"); assert(output.str()=="A string");
} }
{
stringstream output;
stringstream content("A string");
auto r=client.request("POST", "/string", content);
output << r->content.rdbuf();
assert(output.str()=="A string");
}
{ {
stringstream output; stringstream output;
auto r=client.request("GET", "/info", "", {{"Test Parameter", "test value"}}); auto r=client.request("GET", "/info", "", {{"Test Parameter", "test value"}});