From bc3dc18045db183fbd45cec4518a4257c02193a2 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Tue, 15 Mar 2016 18:56:06 +0700 Subject: [PATCH] Add new overloaded extension method Task> GetResponse(this IConnection connection, Uri uri, Dictionary parameters) to work with IConnection. --- Octokit/Helpers/ApiExtensions.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Octokit/Helpers/ApiExtensions.cs b/Octokit/Helpers/ApiExtensions.cs index 81b1ab8e..d25027e0 100644 --- a/Octokit/Helpers/ApiExtensions.cs +++ b/Octokit/Helpers/ApiExtensions.cs @@ -74,6 +74,23 @@ namespace Octokit return connection.Get(uri, null, null); } + /// + /// Gets the API resource at the specified URI. + /// + /// Type of the API resource to get. + /// The connection to use + /// URI of the API resource to get + /// Querystring parameters for the request + /// The API resource. + /// Thrown when an API error occurs. + public static Task> GetResponse(this IConnection connection, Uri uri, Dictionary parameters) + { + Ensure.ArgumentNotNull(connection, "connection"); + Ensure.ArgumentNotNull(uri, "uri"); + + return connection.Get(uri, parameters, null); + } + [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] public static Task> GetRedirect(this IConnection connection, Uri uri) {