diff options
Diffstat (limited to 'src/zenhttp/httpclient_test.cpp')
| -rw-r--r-- | src/zenhttp/httpclient_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/zenhttp/httpclient_test.cpp b/src/zenhttp/httpclient_test.cpp index 7a657c464..af653cbb2 100644 --- a/src/zenhttp/httpclient_test.cpp +++ b/src/zenhttp/httpclient_test.cpp @@ -492,6 +492,17 @@ TEST_CASE("httpclient.put") CHECK_EQ(Resp.StatusCode, HttpResponseCode::Created); CHECK_EQ(Resp.AsText(), "resource created"); } + + SUBCASE("PUT with payload and query parameters") + { + const char* Payload = "put payload data"; + IoBuffer Buf(IoBuffer::Clone, Payload, strlen(Payload)); + Buf.SetContentType(ZenContentType::kText); + + HttpClient::Response Resp = Client.Put("/api/test/echo/uri", Buf, {}, {{"key", "value"}}); + CHECK(Resp.IsSuccess()); + CHECK_EQ(Resp.AsText(), "echo/uri\nkey=value"); + } } TEST_CASE("httpclient.upload") |