summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http/curl-get.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/http/curl-get.cpp')
-rw-r--r--sca-cpp/trunk/modules/http/curl-get.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/sca-cpp/trunk/modules/http/curl-get.cpp b/sca-cpp/trunk/modules/http/curl-get.cpp
index cbd693092a..4d5f1837fc 100644
--- a/sca-cpp/trunk/modules/http/curl-get.cpp
+++ b/sca-cpp/trunk/modules/http/curl-get.cpp
@@ -20,20 +20,20 @@
/* $Rev$ $Date$ */
/**
- * HTTP client command line test tool.
+ * HTTP GET command line test tool.
*/
#include <assert.h>
#include "stream.hpp"
#include "string.hpp"
#include "perf.hpp"
-#include "curl.hpp"
+#include "http.hpp"
namespace tuscany {
namespace http {
-const bool testGet(const string& url) {
- CURLSession ch;
+const bool testGet(const string& url, const string& ca = "", const string& cert = "", const string& key = "") {
+ CURLSession ch(ca, cert, key);
const failable<value> val = get(url, ch);
assert(hasContent(val));
cout << val << endl;
@@ -44,7 +44,10 @@ const bool testGet(const string& url) {
}
int main(unused const int argc, const char** argv) {
- tuscany::http::testGet(tuscany::string(argv[1]));
+ if (argc > 2)
+ tuscany::http::testGet(tuscany::string(argv[1]), tuscany::string(argv[2]), tuscany::string(argv[3]), tuscany::string(argv[4]));
+ else
+ tuscany::http::testGet(tuscany::string(argv[1]));
return 0;
}