SyndicationClient SyndicationClient SyndicationClient SyndicationClient SyndicationClient Class

Definition

Implements the ISyndicationClient interface which retrieves feeds from a URI asynchronously.

public : sealed class SyndicationClient : ISyndicationClient
struct winrt::Windows::Web::Syndication::SyndicationClient : ISyndicationClient
public sealed class SyndicationClient : ISyndicationClient
Public NotInheritable Class SyndicationClient Implements ISyndicationClient
var syndicationClient = new syndicationClient();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The following code demonstrates how to retrieve a feed using RetrieveFeedAsync.

function GetFeed(feedUri) {
     var uri = new Windows.Foundation.Uri(feedUri);
     var client = new Windows.Web.Syndication.SyndicationClient();
     client.bypassCacheOnRetrieve = true;
     client.retrieveFeedAsync(uri).then(function (feed) {
            currentFeed = feed;
     }
}

using Windows.Foundation;
using Windows.Web.Syndication;

async Task GetFeedAsync(string feedUri){
      var uri = new Uri(feedUri);
      var client = new SyndicationClient() {
          BypassCacheOnRetrieve = true
      };
      currentFeed = await client.RetrieveFeedAsync(uri);
}

For additional examples that demonstrate how this class is used to retrieve syndicated content from the web, see Quickstart: Accessing a web feed.

Constructors

SyndicationClient() SyndicationClient() SyndicationClient() SyndicationClient() SyndicationClient()

Creates a new SyndicationClient object.

SyndicationClient(PasswordCredential) SyndicationClient(PasswordCredential) SyndicationClient(PasswordCredential) SyndicationClient(PasswordCredential) SyndicationClient(PasswordCredential)

Creates a new SyndicationClient object with authentication credentials.

Properties

BypassCacheOnRetrieve BypassCacheOnRetrieve BypassCacheOnRetrieve BypassCacheOnRetrieve BypassCacheOnRetrieve

Gets or sets a Boolean value that specifies whether to bypass the cache when retrieving the feed.

MaxResponseBufferSize MaxResponseBufferSize MaxResponseBufferSize MaxResponseBufferSize MaxResponseBufferSize

Gets or sets the maximum number of bytes to buffer when receiving a response from a server.

ProxyCredential ProxyCredential ProxyCredential ProxyCredential ProxyCredential

Gets or sets the credentials to use when making requests via a proxy.

ServerCredential ServerCredential ServerCredential ServerCredential ServerCredential

Gets or sets the credentials to use when making requests to the server.

Timeout Timeout Timeout Timeout Timeout

Gets or sets the maximum amount of time, in milliseconds, to wait for any of the asynchronous operations to complete. If the operation is not complete within this amount of time, it will fail with a status code indicating that it timed out.

Methods

RetrieveFeedAsync(Uri) RetrieveFeedAsync(Uri) RetrieveFeedAsync(Uri) RetrieveFeedAsync(Uri) RetrieveFeedAsync(Uri)

Starts an asynchronous operation to download the syndication feed from the given URI. This method instantiates a SyndicationFeed object from the feed string, which can be in one of the formats specified in SyndicationFormat.

SetRequestHeader(String, String) SetRequestHeader(String, String) SetRequestHeader(String, String) SetRequestHeader(String, String) SetRequestHeader(String, String)

Sets an HTTP header for the request. This method can be called multiple times to set multiple headers. When the same header is set multiple times, the values will be concatenated and separated by ",".

See Also