diff --git a/Octokit.Tests/Clients/TeamsClientTests.cs b/Octokit.Tests/Clients/TeamsClientTests.cs index c08c640a..31806b0c 100644 --- a/Octokit.Tests/Clients/TeamsClientTests.cs +++ b/Octokit.Tests/Clients/TeamsClientTests.cs @@ -309,7 +309,7 @@ namespace Octokit.Tests.Clients client.AddRepository(1, "org", "repo", newPermission); - connection.Connection.Received().Put(Arg.Is(u => u.ToString() == "teams/1/repos/org/repo"), Arg.Any()); + connection.Connection.Received().Put(Arg.Is(u => u.ToString() == "teams/1/repos/org/repo"), Arg.Any(), "application/vnd.github.ironman-preview+json"); } [Fact] diff --git a/Octokit/Clients/TeamsClient.cs b/Octokit/Clients/TeamsClient.cs index 25d986e9..e23f3ba2 100644 --- a/Octokit/Clients/TeamsClient.cs +++ b/Octokit/Clients/TeamsClient.cs @@ -335,8 +335,8 @@ namespace Octokit try { - var httpStatusCode = await ApiConnection.Connection.Put(endpoint, permission).ConfigureAwait(false); - return httpStatusCode == HttpStatusCode.NoContent; + var httpStatusCode = await ApiConnection.Connection.Put(endpoint, permission, "", AcceptHeaders.OrganizationPermissionsPreview).ConfigureAwait(false); + return httpStatusCode.HttpResponse.StatusCode == HttpStatusCode.NoContent; } catch (NotFoundException) { diff --git a/Octokit/Http/Connection.cs b/Octokit/Http/Connection.cs index 229849f7..7a8a203f 100644 --- a/Octokit/Http/Connection.cs +++ b/Octokit/Http/Connection.cs @@ -404,21 +404,6 @@ namespace Octokit return response.HttpResponse.StatusCode; } - /// - /// Performs an asynchronous HTTP PUT request that expects an empty response. - /// - /// URI endpoint to send request to - /// The object to serialize as the body of the request - /// The returned - public async Task Put(Uri uri, object body) - { - Ensure.ArgumentNotNull(uri, "uri"); - Ensure.ArgumentNotNull(body, "body"); - - var response = await SendData(uri, HttpMethod.Put, body, null, null, CancellationToken.None).ConfigureAwait(false); - return response.HttpResponse.StatusCode; - } - /// /// Performs an asynchronous HTTP DELETE request that expects an empty response. /// diff --git a/Octokit/Http/IConnection.cs b/Octokit/Http/IConnection.cs index d89c22c3..39ddac53 100644 --- a/Octokit/Http/IConnection.cs +++ b/Octokit/Http/IConnection.cs @@ -197,14 +197,6 @@ namespace Octokit /// The returned Task Put(Uri uri); - /// - /// Performs an asynchronous HTTP PUT request that expects an empty response. - /// - /// URI endpoint to send request to - /// The object to serialize as the body of the request - /// The returned - Task Put(Uri uri, object body); - /// /// Performs an asynchronous HTTP DELETE request that expects an empty response. ///