SimpleFeedReader icon indicating copy to clipboard operation
SimpleFeedReader copied to clipboard

Proxy settings

Open zoffoliluca opened this issue 10 years ago • 1 comments

I have a question : What if I'm behind a proxy? Is there a property to set?

Thanks!

zoffoliluca avatar Mar 06 '15 07:03 zoffoliluca

Then you'll need to take care of retrieving the data yourself and use an XmlReader to feed the data into a FeedReader:

using (var client = new WebClient()
{
    Proxy = new WebProxy("http://theproxy:port/")
    {
        Credentials = new NetworkCredential("user", "pass")
    }
})
{
    var stringreader = new StringReader(client.DownloadString("http://example.com/feed/"));
    var xmlreader = XmlReader.Create(stringreader);
    var items = new FeedReader().RetrieveFeed(xmlreader);
}

I'll see if I can add a property to set the proxy (actually, IProxy) so the feedreader will automatically use it. As I'm currently pretty busy I wouldn't hold my breath though. But PR's are welcome ;)

RobThree avatar Mar 06 '15 08:03 RobThree