using MediaBrowser.Model.Logging; using System; using System.IO; using System.Threading; using System.Threading.Tasks; namespace MediaBrowser.ApiInteraction { /// /// Interface IHttpClient /// public interface IAsyncHttpClient : IDisposable { /// /// Sets the authorization header that should be supplied on every request /// /// void SetAuthorizationHeader(string header); /// /// Gets the stream async. /// /// The URL. /// The logger. /// The cancellation token. /// Task{Stream}. Task GetAsync(string url, ILogger logger, CancellationToken cancellationToken); /// /// Deletes the async. /// /// The URL. /// The logger. /// The cancellation token. /// Task. Task DeleteAsync(string url, ILogger logger, CancellationToken cancellationToken); /// /// Posts the async. /// /// The URL. /// Type of the content. /// Content of the post. /// The logger. /// The cancellation token. /// Task{Stream}. Task PostAsync(string url, string contentType, string postContent, ILogger logger, CancellationToken cancellationToken); } }