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:
Haacked
2015-01-01 19:12:22 -08:00
parent 37dec8491c
commit 49f95d40f1
16 changed files with 183 additions and 152 deletions
+2 -6
View File
@@ -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);
}
}
}