diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-08 08:18:07 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-08 08:18:07 +0000 |
commit | 49b878b1b0f2e52bbd5282c22ac32a68e1e8736c (patch) | |
tree | 1eb26926f9d703c61b329a0f07178090b57cd55d /sca-cpp/trunk/modules/http/http.hpp | |
parent | 5b33dc5c5a87fff146951ca0543bf558454c331d (diff) |
Change ATOM and RSS feed representations to use name value pairs instead of just strings, to allow support for all ATOM and RSS attributes and avoid confusion with non-feed string results.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1079292 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/http/http.hpp')
-rw-r--r-- | sca-cpp/trunk/modules/http/http.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sca-cpp/trunk/modules/http/http.hpp b/sca-cpp/trunk/modules/http/http.hpp index e2327be40a..7050021fb9 100644 --- a/sca-cpp/trunk/modules/http/http.hpp +++ b/sca-cpp/trunk/modules/http/http.hpp @@ -407,19 +407,19 @@ const failable<value> get(const string& url, const CURLSession& cs) { if (atom::isATOMEntry(ls)) { // Read an ATOM entry - const value val(atom::entryValue(content(atom::readATOMEntry(ls)))); + const value val(elementsToValues(content(atom::readATOMEntry(ls)))); debug(val, "http::get::result"); return val; } if (contains(ct, "application/atom+xml") || atom::isATOMFeed(ls)) { // Read an ATOM feed - const value val(atom::feedValues(content(atom::readATOMFeed(ls)))); + const value val(elementsToValues(content(atom::readATOMFeed(ls)))); debug(val, "http::get::result"); return val; } if (contains(ct, "application/rss+xml") || rss::isRSSFeed(ls)) { // Read an RSS feed - const value val(rss::feedValues(content(rss::readRSSFeed(ls)))); + const value val(elementsToValues(content(rss::readRSSFeed(ls)))); debug(val, "http::get::result"); return val; } @@ -449,7 +449,7 @@ const failable<value> get(const string& url, const CURLSession& cs) { const failable<value> post(const value& val, const string& url, const CURLSession& cs) { // Convert value to an ATOM entry - const failable<list<string> > entry = atom::writeATOMEntry(atom::entryValuesToElements(val)); + const failable<list<string> > entry = atom::writeATOMEntry(valuesToElements(val)); if (!hasContent(entry)) return mkfailure<value>(reason(entry)); debug(url, "http::post::url"); @@ -474,7 +474,7 @@ const failable<value> post(const value& val, const string& url, const CURLSessio const failable<value> put(const value& val, const string& url, const CURLSession& cs) { // Convert value to an ATOM entry - const failable<list<string> > entry = atom::writeATOMEntry(atom::entryValuesToElements(val)); + const failable<list<string> > entry = atom::writeATOMEntry(valuesToElements(val)); if (!hasContent(entry)) return mkfailure<value>(reason(entry)); debug(url, "http::put::url"); |