Created
December 24, 2010 15:09
-
-
Save follesoe/754322 to your computer and use it in GitHub Desktop.
Using Yahoo Pipes as a Silverlight Cross Domain Proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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