summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http/curl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/http/curl.hpp')
-rw-r--r--sca-cpp/trunk/modules/http/curl.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/sca-cpp/trunk/modules/http/curl.hpp b/sca-cpp/trunk/modules/http/curl.hpp
index 95c81d9b94..3d11ac56b1 100644
--- a/sca-cpp/trunk/modules/http/curl.hpp
+++ b/sca-cpp/trunk/modules/http/curl.hpp
@@ -37,6 +37,7 @@
#include "monad.hpp"
#include "parallel.hpp"
#include "../atom/atom.hpp"
+#include "../rss/rss.hpp"
#include "../json/json.hpp"
namespace tuscany {
@@ -330,10 +331,23 @@ const failable<value> get(const string& url, const CURLSession& ch) {
const string ct(content(contentType(car(content(res)))));
if (ct == "application/atom+xml;type=entry") {
+ // Read an ATOM entry
const value val(atom::entryValue(content(atom::readATOMEntry(ls))));
debug(val, "http::get::result");
return val;
}
+ if (ct == "application/atom+xml;type=feed" || atom::isATOMFeed(ls)) {
+ // Read an ATOM feed
+ const value val(atom::feedValues(content(atom::readATOMFeed(ls))));
+ debug(val, "http::get::result");
+ return val;
+ }
+ if (ct == "application/rss+xml" || rss::isRSSFeed(ls)) {
+ // Read an RSS feed
+ const value val(rss::feedValues(content(rss::readRSSFeed(ls))));
+ debug(val, "http::get::result");
+ return val;
+ }
// Return the content as a list of values
const value val(mkvalues(ls));