summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http/curl-get.cpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-08-14 18:46:26 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-08-14 18:46:26 +0000
commitd6451b81703c809abcd0f51e74abdba7c732b513 (patch)
treefab2013702ae33a07e5bb43abad606e0201b485b /sca-cpp/trunk/modules/http/curl-get.cpp
parentd090bd129574458379aa9997345e7ca5b2c24886 (diff)
Some refactoring of the HTTP support, tunnel Memcached requests over HTTPS and add HTTPS config to store-cluster sample.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@985561 13f79535-47bb-0310-9956-ffa450edef68
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;
}