+// test proxy
+ {
+ cl.setProxy("localhost:2000");
+ TestRequest* tr = new TestRequest("http://www.google.com/test2");
+ HTTP::Request_ptr own(tr);
+ cl.makeRequest(tr);
+ waitForComplete(tr);
+ COMPARE(tr->responseCode(), 200);
+ COMPARE(tr->contentLength(), body2Size);
+ COMPARE(tr->bodyData, string(body2, body2Size));
+ }
+
+ {
+ cl.setProxy("localhost:2000", "ABCDEF");
+ TestRequest* tr = new TestRequest("http://www.google.com/test3");
+ HTTP::Request_ptr own(tr);
+ cl.makeRequest(tr);
+ waitForComplete(tr);
+ COMPARE(tr->responseCode(), 200);
+ COMPARE(tr->contentLength(), body2Size);
+ COMPARE(tr->bodyData, string(body2, body2Size));
+ }
+