From 627b8370a89cbf9826898c2edfc46767dfb5272a Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Sun, 3 Mar 2013 00:25:42 -0500 Subject: made IHttpClient a little more flexible, allow Semaphore to be optional --- MediaBrowser.Common/Net/IHttpClient.cs | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'MediaBrowser.Common/Net/IHttpClient.cs') diff --git a/MediaBrowser.Common/Net/IHttpClient.cs b/MediaBrowser.Common/Net/IHttpClient.cs index d02f08572..cec3ccff2 100644 --- a/MediaBrowser.Common/Net/IHttpClient.cs +++ b/MediaBrowser.Common/Net/IHttpClient.cs @@ -21,6 +21,14 @@ namespace MediaBrowser.Common.Net /// Task Get(string url, SemaphoreSlim resourcePool, CancellationToken cancellationToken); + /// + /// Gets the specified URL. + /// + /// The URL. + /// The cancellation token. + /// Task{Stream}. + Task Get(string url, CancellationToken cancellationToken); + /// /// Performs a POST request /// @@ -33,6 +41,15 @@ namespace MediaBrowser.Common.Net /// Task Post(string url, Dictionary postData, SemaphoreSlim resourcePool, CancellationToken cancellationToken); + /// + /// Posts the specified URL. + /// + /// The URL. + /// The post data. + /// The cancellation token. + /// Task{Stream}. + Task Post(string url, Dictionary postData, CancellationToken cancellationToken); + /// /// Downloads the contents of a given url into a temporary location /// @@ -46,6 +63,16 @@ namespace MediaBrowser.Common.Net /// Task GetTempFile(string url, SemaphoreSlim resourcePool, CancellationToken cancellationToken, IProgress progress, string userAgent = null); + /// + /// Gets the temp file. + /// + /// The URL. + /// The cancellation token. + /// The progress. + /// The user agent. + /// Task{System.String}. + Task GetTempFile(string url, CancellationToken cancellationToken, IProgress progress, string userAgent = null); + /// /// Downloads the contents of a given url into a MemoryStream /// @@ -55,5 +82,13 @@ namespace MediaBrowser.Common.Net /// Task{MemoryStream}. /// Task GetMemoryStream(string url, SemaphoreSlim resourcePool, CancellationToken cancellationToken); + + /// + /// Gets the memory stream. + /// + /// The URL. + /// The cancellation token. + /// Task{MemoryStream}. + Task GetMemoryStream(string url, CancellationToken cancellationToken); } } \ No newline at end of file -- cgit v1.2.3