Remove previously obsoleted IConnection.GetRedirect and IApiConnection.GetRedirect methods

This commit is contained in:
Ryan Gribble
2016-09-06 23:13:51 +10:00
parent 6042a12983
commit 9d22ed4b1c
3 changed files with 0 additions and 42 deletions
-9
View File
@@ -74,15 +74,6 @@ namespace Octokit
return connection.Get<T>(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<IApiResponse<T>> GetRedirect<T>(this IConnection connection, Uri uri)
{
Ensure.ArgumentNotNull(connection, "connection");
Ensure.ArgumentNotNull(uri, "uri");
return connection.Get<T>(uri, null, null);
}
/// <summary>
/// Gets the API resource at the specified URI.
/// </summary>
-22
View File
@@ -493,28 +493,6 @@ namespace Octokit
return Connection.Delete(uri, data, accepts);
}
/// <summary>
/// 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.
/// </summary>
/// <param name="uri">URI of the API resource to get</param>
/// <returns>The URL returned by the API in the Location header</returns>
/// <exception cref="ApiException">Thrown when an API error occurs, or the API does not respond with a 302 Found</exception>
[Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")]
public async Task<string> GetRedirect(Uri uri)
{
Ensure.ArgumentNotNull(uri, "uri");
var response = await Connection.GetRedirect<string>(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);
}
/// <summary>
/// Executes a GET to the API object at the specified URI. This operation is appropriate for API calls which
-11
View File
@@ -320,17 +320,6 @@ namespace Octokit
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
Task Delete(Uri uri, object data, string accepts);
/// <summary>
/// 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.
/// </summary>
/// <param name="uri">URI of the API resource to get</param>
/// <returns>The URL returned by the API in the Location header</returns>
/// <exception cref="ApiException">Thrown when an API error occurs, or the API does not respond with a 302 Found</exception>
[Obsolete("Octokit's HTTP library now follows redirects by default - this API will be removed in a future release")]
Task<string> GetRedirect(Uri uri);
/// <summary>
/// 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.