Skip to content

Instantly share code, notes, and snippets.

@follesoe
Created December 24, 2010 15:09
Show Gist options
  • Save follesoe/754322 to your computer and use it in GitHub Desktop.
Save follesoe/754322 to your computer and use it in GitHub Desktop.
Using Yahoo Pipes as a Silverlight Cross Domain Proxy
private void DownloadFeed()
{
string pipeUrl = "http://pipes.yahooapis.com/pipes/pipe.run?_id=4rBri9Ef3RG8CEGLLe2fWQ&_render=rss&feedUrl=";
string feedUrl = "http://feeds.feedburner.com/follesoe";
string url = string.Concat(pipeUrl, HttpUtility.UrlEncode(feedUrl));
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(url));
request.BeginGetResponse(<span class="kwrd">new</span> AsyncCallback(ResponseHandler), request);
}
private void ResponseHandler(IAsyncResult asyncResult)
{
HttpWebRequest request = (HttpWebRequest)asyncResult.AsyncState;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asyncResult);
if (response.StatusCode == HttpStatusCode.OK)
{
XmlReader reader = XmlReader.Create(response.GetResponseStream());
SyndicationFeed newFeed = SyndicationFeed.Load(reader);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment