Files
octokit.net/Octokit/Http/IHttpClient.cs
2015-05-22 16:46:24 +09:30

24 lines
914 B
C#

using System;
using System.Threading;
using System.Threading.Tasks;
namespace Octokit.Internal
{
/// <summary>
/// Generic Http client. Useful for those who want to swap out System.Net.HttpClient with something else.
/// </summary>
/// <remarks>
/// Most folks won't ever need to swap this out. But if you're trying to run this on Windows Phone, you might.
/// </remarks>
public interface IHttpClient : IDisposable
{
/// <summary>
/// Sends the specified request and returns a response.
/// </summary>
/// <param name="request">A <see cref="IRequest"/> that represents the HTTP request</param>
/// <param name="cancellationToken">Used to cancel the request</param>
/// <returns>A <see cref="Task" /> of <see cref="IResponse"/></returns>
Task<IResponse> Send(IRequest request, CancellationToken cancellationToken);
}
}