diff --git a/Octokit/Helpers/ApiExtensions.cs b/Octokit/Helpers/ApiExtensions.cs index b0afbd42..abfcafec 100644 --- a/Octokit/Helpers/ApiExtensions.cs +++ b/Octokit/Helpers/ApiExtensions.cs @@ -74,15 +74,6 @@ namespace Octokit return connection.Get(uri, null, 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) - { - Ensure.ArgumentNotNull(connection, "connection"); - Ensure.ArgumentNotNull(uri, "uri"); - - return connection.Get(uri, null, null); - } - /// /// Gets the API resource at the specified URI. /// diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs index 988d7f0d..0d609033 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -493,28 +493,6 @@ namespace Octokit return Connection.Delete(uri, data, accepts); } - /// - /// Executes a GET to the API object at the specified URI. This operation is appropriate for - /// API calls which wants to return the redirect URL. - /// It expects the API to respond with a 302 Found. - /// - /// URI of the API resource to get - /// The URL returned by the API in the Location header - /// Thrown when an API error occurs, or the API does not respond with a 302 Found - [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] - public async Task GetRedirect(Uri uri) - { - Ensure.ArgumentNotNull(uri, "uri"); - var response = await Connection.GetRedirect(uri).ConfigureAwait(false); - - if (response.HttpResponse.StatusCode == HttpStatusCode.Redirect) - { - return response.HttpResponse.Headers["Location"]; - } - - throw new ApiException("Redirect Operation expect status code of Redirect.", - response.HttpResponse.StatusCode); - } /// /// Executes a GET to the API object at the specified URI. This operation is appropriate for API calls which diff --git a/Octokit/Http/IApiConnection.cs b/Octokit/Http/IApiConnection.cs index 72c4f742..a7ff7505 100644 --- a/Octokit/Http/IApiConnection.cs +++ b/Octokit/Http/IApiConnection.cs @@ -320,17 +320,6 @@ namespace Octokit /// The returned Task Delete(Uri uri, object data, string accepts); - /// - /// Executes a GET to the API object at the specified URI. This operation is appropriate for - /// API calls which wants to return the redirect URL. - /// It expects the API to respond with a 302 Found. - /// - /// URI of the API resource to get - /// The URL returned by the API in the Location header - /// Thrown when an API error occurs, or the API does not respond with a 302 Found - [Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")] - Task GetRedirect(Uri uri); - /// /// Executes a GET to the API object at the specified URI. This operation is appropriate for API calls which /// queue long running calculations and return a collection of a resource.