mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-20 15:55:25 +03:00
Add GPL modules
This commit is contained in:
59
MediaBrowser.Common/Net/IHttpClient.cs
Normal file
59
MediaBrowser.Common/Net/IHttpClient.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Common.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHttpClient
|
||||
/// </summary>
|
||||
public interface IHttpClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the response.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>Task{HttpResponseInfo}.</returns>
|
||||
Task<HttpResponseInfo> GetResponse(HttpRequestOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified options.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>Task{Stream}.</returns>
|
||||
Task<Stream> Get(HttpRequestOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <param name="httpMethod">The HTTP method.</param>
|
||||
/// <returns>Task{HttpResponseInfo}.</returns>
|
||||
Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, string httpMethod);
|
||||
|
||||
/// <summary>
|
||||
/// Posts the specified options.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>Task{HttpResponseInfo}.</returns>
|
||||
Task<HttpResponseInfo> Post(HttpRequestOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the contents of a given url into a temporary location
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>Task{System.String}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">progress</exception>
|
||||
/// <exception cref="MediaBrowser.Model.Net.HttpException"></exception>
|
||||
Task<string> GetTempFile(HttpRequestOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the temporary file response.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>Task{HttpResponseInfo}.</returns>
|
||||
Task<HttpResponseInfo> GetTempFileResponse(HttpRequestOptions options);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user