Fork me on GitHub
Show / Hide Table of Contents

Class HttpDownloader

HTTP Downloader.

Inheritance
System.Object
HttpDownloader
Namespace: OpenGraphNet
Assembly: OpenGraphNet.dll
Syntax
public class HttpDownloader : Object
Remarks

Taken from http://stackoverflow.com/a/2700707.

Constructors

HttpDownloader(Uri, String, String, Int32)

Initializes a new instance of the HttpDownloader class.

Declaration
public HttpDownloader(Uri url, string referrer, string userAgent, int timeout)
Parameters
Type Name Description
System.Uri url

The URL.

System.String referrer

The referrer.

System.String userAgent

The user agent.

System.Int32 timeout

The timeout in milliseconds.

Properties

Url

Gets or sets the URL.

Declaration
public Uri Url { get; set; }
Property Value
Type Description
System.Uri

The URL.

Methods

GetPageAsync(CancellationToken)

Gets the page asynchronously.

Declaration
public Task<string> GetPageAsync(CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

The cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
System.Threading.Tasks.Task<System.String>

The content of the page.

Back to top Copyright © 2021 - Geoff Horsey Mastodon