diff options
Diffstat (limited to 'Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index fe545ecff..3fdd05135 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -279,40 +279,10 @@ namespace Emby.Server.Implementations.HttpClientManager public async Task<Stream> Get(HttpRequestOptions options) { var response = await GetResponse(options).ConfigureAwait(false); - return response.Content; } /// <summary> - /// Performs a GET request and returns the resulting stream - /// </summary> - /// <param name="url">The URL.</param> - /// <param name="resourcePool">The resource pool.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task{Stream}.</returns> - public Task<Stream> Get(string url, SemaphoreSlim resourcePool, CancellationToken cancellationToken) - { - return Get(new HttpRequestOptions - { - Url = url, - ResourcePool = resourcePool, - CancellationToken = cancellationToken, - BufferContent = resourcePool != null - }); - } - - /// <summary> - /// Gets the specified URL. - /// </summary> - /// <param name="url">The URL.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task{Stream}.</returns> - public Task<Stream> Get(string url, CancellationToken cancellationToken) - { - return Get(url, null, cancellationToken); - } - - /// <summary> /// send as an asynchronous operation. /// </summary> /// <param name="options">The options.</param> @@ -590,26 +560,6 @@ namespace Emby.Server.Implementations.HttpClientManager } /// <summary> - /// Performs a POST request - /// </summary> - /// <param name="url">The URL.</param> - /// <param name="postData">Params to add to the POST data.</param> - /// <param name="resourcePool">The resource pool.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>stream on success, null on failure</returns> - public Task<Stream> Post(string url, Dictionary<string, string> postData, SemaphoreSlim resourcePool, CancellationToken cancellationToken) - { - return Post(new HttpRequestOptions - { - Url = url, - ResourcePool = resourcePool, - CancellationToken = cancellationToken, - BufferContent = resourcePool != null - - }, postData); - } - - /// <summary> /// Downloads the contents of a given url into a temporary location /// </summary> /// <param name="options">The options.</param> @@ -891,18 +841,6 @@ namespace Emby.Server.Implementations.HttpClientManager } } - /// <summary> - /// Posts the specified URL. - /// </summary> - /// <param name="url">The URL.</param> - /// <param name="postData">The post data.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task{Stream}.</returns> - public Task<Stream> Post(string url, Dictionary<string, string> postData, CancellationToken cancellationToken) - { - return Post(url, postData, null, cancellationToken); - } - private Task<WebResponse> GetResponseAsync(WebRequest request, TimeSpan timeout) { var taskCompletion = new TaskCompletionSource<WebResponse>(); |
