SyndicationClient class

Applies to Windows and Windows Phone

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

Syntax


var syndicationClient = new Windows.Web.Syndication.SyndicationClient(passwordCredential);
var syndicationClient = new Windows.Web.Syndication.SyndicationClient();

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Members

The SyndicationClient class has these types of members:

Constructors

The SyndicationClient class has these constructors.

ConstructorDescription
SyndicationClient() Creates a new SyndicationClient object.
SyndicationClient(PasswordCredential) Creates a new SyndicationClient object with authentication credentials.

 

Methods

The SyndicationClient class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
RetrieveFeedAsync 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 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 ,.

 

Properties

The SyndicationClient class has these properties.

PropertyAccess typeDescription

BypassCacheOnRetrieve

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

MaxResponseBufferSize

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

ProxyCredential

Read/writeGets or sets the credentials to use when making requests via a proxy.

ServerCredential

Read/writeGets or sets the credentials to use when making requests to the server.

Timeout

Read/writeGets 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.

 

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;
     }
}

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

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Syndication
Windows::Web::Syndication [C++]

Metadata

Windows.winmd

See also

Quickstart: Accessing a web feed
Syndication sample

 

 

Show:
© 2014 Microsoft. All rights reserved.