aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-10-20 12:19:03 -0400
committerGitHub <noreply@github.com>2017-10-20 12:19:03 -0400
commit9b383f6b1ad57489c71e4d81d9c831d3d5960f10 (patch)
tree87fc46c77646967dbb88f49538531a81004f9a7b /Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs
parent93a0244b7aee9d850dfa48762e64348a3c864ef5 (diff)
parent0cf4f01dc72b3775e3af067ed1eef51c683a3c02 (diff)
Merge pull request #2965 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs')
-rw-r--r--Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs62
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>();