+// POST
+ {
+ cout << "POST" << endl;
+ TestRequest* tr = new TestRequest("http://localhost:2000/test_post?foo=abc&bar=1234&username=johndoe", "POST");
+ tr->bodyContentType = "application/x-www-form-urlencoded";
+
+ HTTP::Request_ptr own(tr);
+ cl.makeRequest(tr);
+ waitForComplete(&cl, tr);
+ COMPARE(tr->responseCode(), 204);
+ }
+
+ // test_zero_length_content
+ {
+ cout << "zero-length-content-response" << endl;
+ TestRequest* tr = new TestRequest("http://localhost:2000/test_zero_length_content");
+ HTTP::Request_ptr own(tr);
+ cl.makeRequest(tr);
+ waitForComplete(&cl, tr);
+ COMPARE(tr->responseCode(), 200);
+ COMPARE(tr->bodyData, string());
+ COMPARE(tr->responseBytesReceived(), 0);
+ }
+
+