Added cancelation token to request

+ overload
This commit is contained in:
Amy Palamountain
2014-02-02 22:03:34 +13:00
parent 809ebd182c
commit 98e1556c37
2 changed files with 19 additions and 3 deletions
+11 -1
View File
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System.Threading;
using System.Threading.Tasks;
namespace Octokit.Internal
{
@@ -17,5 +18,14 @@ namespace Octokit.Internal
/// <param name="request">A <see cref="IRequest"/> that represents the HTTP request</param>
/// <returns>A <see cref="Task{T}" /> of <see cref="IResponse{T}"/></returns>
Task<IResponse<T>> Send<T>(IRequest request);
/// <summary>
/// Sends the specified request and returns a response.
/// </summary>
/// <typeparam name="T">The type of data to send</typeparam>
/// <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{T}" /> of <see cref="IResponse{T}"/></returns>
Task<IResponse<T>> Send<T>(IRequest request, CancellationToken cancellationToken);
}
}