using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Common.Net
{
///
/// Interface IHttpClient
///
public interface IHttpClient : IDisposable
{
///
/// Gets the response.
///
/// The options.
/// Task{HttpResponseInfo}.
Task GetResponse(HttpRequestOptions options);
///
/// Performs a GET request and returns the resulting stream
///
/// The URL.
/// The resource pool.
/// The cancellation token.
/// Task{Stream}.
///
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);
///
/// Gets the specified options.
///
/// The options.
/// Task{Stream}.
Task Get(HttpRequestOptions options);
///
/// Performs a POST request
///
/// The URL.
/// Params to add to the POST data.
/// The resource pool.
/// The cancellation token.
/// stream on success, null on failure
/// postData
///
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);
///
/// Posts the specified options.
///
/// The options.
/// Task{HttpResponseInfo}.
Task Post(HttpRequestOptions options);
///
/// Downloads the contents of a given url into a temporary location
///
/// The options.
/// Task{System.String}.
/// progress
///
Task GetTempFile(HttpRequestOptions options);
///
/// Gets the temporary file response.
///
/// The options.
/// Task{HttpResponseInfo}.
Task GetTempFileResponse(HttpRequestOptions options);
}
}