Change curl-get utility to display error message instead of aborting on error.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1517424 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
64587892af
commit
96f1562808
1 changed files with 4 additions and 2 deletions
|
@ -35,8 +35,10 @@ namespace http {
|
||||||
const bool testGet(const string& url, const string& ca = "", const string& cert = "", const string& key = "") {
|
const bool testGet(const string& url, const string& ca = "", const string& cert = "", const string& key = "") {
|
||||||
const CURLSession ch(ca, cert, key, "", 0);
|
const CURLSession ch(ca, cert, key, "", 0);
|
||||||
const failable<value> val = get(url, ch);
|
const failable<value> val = get(url, ch);
|
||||||
assert(hasContent(val));
|
if(!hasContent(val))
|
||||||
cout << content(val) << endl;
|
cerr << reason(val) << endl;
|
||||||
|
else
|
||||||
|
cout << content(val) << endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue