mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 10:25:36 +00:00
Extension method for IHttpClient
To not require cancellation token
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
public static class HttpClientExtensions
|
||||
{
|
||||
public static Task<IResponse<T>> Send<T>(this IHttpClient httpClient, IRequest request)
|
||||
{
|
||||
Ensure.ArgumentNotNull(httpClient, "httpClient");
|
||||
Ensure.ArgumentNotNull(request, "request");
|
||||
|
||||
return httpClient.Send<T>(request, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user