mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 02:45:32 +00:00
Remove Type parameter for IHttpClient send method
This keeps the IHttpClient interface simpler and ensures the deserialization responsibility lies outside of that class. It only needed the Type parameter for a special case that could be handled in a better way.
This commit is contained in:
@@ -7,16 +7,12 @@ namespace Octokit
|
||||
{
|
||||
public static class HttpClientExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// OBSOLETE
|
||||
/// </summary>
|
||||
[Obsolete("This will be removed in a future release")]
|
||||
public static Task<IResponse<T>> Send<T>(this IHttpClient httpClient, IRequest request)
|
||||
public static Task<IResponse> Send(this IHttpClient httpClient, IRequest request)
|
||||
{
|
||||
Ensure.ArgumentNotNull(httpClient, "httpClient");
|
||||
Ensure.ArgumentNotNull(request, "request");
|
||||
|
||||
return httpClient.Send<T>(request, CancellationToken.None);
|
||||
return httpClient.Send(request, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user