Added convenience function Client::Response::Content::string()
This commit is contained in:
parent
4efdc095bd
commit
6b7fd993cf
5 changed files with 29 additions and 4 deletions
|
|
@ -70,6 +70,13 @@ int main() {
|
|||
assert(output.str()=="A string");
|
||||
}
|
||||
|
||||
{
|
||||
stringstream output;
|
||||
auto r=client.request("POST", "/string", "A string");
|
||||
assert(SimpleWeb::status_code(r->status_code)==SimpleWeb::StatusCode::success_ok);
|
||||
assert(r->content.string()=="A string");
|
||||
}
|
||||
|
||||
{
|
||||
stringstream output;
|
||||
auto r=client.request("POST", "/string2", "A string");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue