public HttpResponseMessage Feed()
{
// create feed
var feedUri = new Uri(BeganFollowingBaseUrl + "beganfollowing");
var feed = new SyndicationFeed(
"BeganFollowing", "Began following domain events", feedUri
);
feed.Authors.Add(
new SyndicationPerson("[email protected]")
);
feed.Items = EventRetriever.RecentEvents("BeganFollowing")
.Select(MapToFeedItem);
// set feed as response - always atom+xml - no HAL
var response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StringContent(
GetFeedContent(feed), Encoding.UTF8, "application/atom+xml"
);
return response;
}