From 74d7ca0cdbcfb2eb824f6ebd41e95a4d073e0c48 Mon Sep 17 00:00:00 2001 From: eidheim Date: Wed, 23 Nov 2016 12:24:55 +0100 Subject: [PATCH] Added Client::request stream content test as suggested in #87 --- tests/io_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/io_test.cpp b/tests/io_test.cpp index e8b1c5d..7caaa6f 100644 --- a/tests/io_test.cpp +++ b/tests/io_test.cpp @@ -47,6 +47,14 @@ int main() { 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; auto r=client.request("GET", "/info", "", {{"Test Parameter", "test value"}});