2019-01-13 21:01:16 +01:00
|
|
|
using System.IO;
|
2018-12-28 00:27:57 +01:00
|
|
|
using System.Threading.Tasks;
|
2019-03-08 20:17:17 +01:00
|
|
|
using System.Net.Http;
|
2018-12-28 00:27:57 +01:00
|
|
|
|
|
|
|
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>
|
2019-03-27 16:34:56 +01:00
|
|
|
/// Warning: Deprecated function,
|
2019-03-08 20:17:17 +01:00
|
|
|
/// use 'Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead
|
2018-12-28 00:27:57 +01:00
|
|
|
/// 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);
|
|
|
|
|
2019-03-08 20:17:17 +01:00
|
|
|
/// <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, HttpMethod httpMethod);
|
|
|
|
|
2018-12-28 00:27:57 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Posts the specified options.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="options">The options.</param>
|
|
|
|
/// <returns>Task{HttpResponseInfo}.</returns>
|
|
|
|
Task<HttpResponseInfo> Post(HttpRequestOptions options);
|
|
|
|
}
|
2018-12-26 01:16:02 +01:00
|
|
|
}
|