diff --git a/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs b/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs index 57b03054..04f0988a 100644 --- a/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs @@ -367,7 +367,7 @@ namespace Octokit.Tests.Reactive client.RemoveFromIssue("fake", "repo", 42, "label"); - connection.Received().Delete>(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/labels/label"), "application/vnd.github.symmetra-preview+json"); + connection.Received().Delete>(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/labels/label"), Arg.Any(), "application/vnd.github.symmetra-preview+json"); } [Fact] @@ -379,7 +379,7 @@ namespace Octokit.Tests.Reactive client.RemoveFromIssue(1, 42, "label"); - connection.Received().Delete>(Arg.Is(u => u.ToString() == "repositories/1/issues/42/labels/label"), "application/vnd.github.symmetra-preview+json"); + connection.Received().Delete>(Arg.Is(u => u.ToString() == "repositories/1/issues/42/labels/label"), Arg.Any(), "application/vnd.github.symmetra-preview+json"); } [Fact] diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs index 9bb83f06..aa8c514c 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -510,6 +510,24 @@ namespace Octokit return response.Body; } + /// + /// Performs an asynchronous HTTP DELETE request. + /// Attempts to map the response body to an object of type + /// + /// The API resource's type. + /// URI endpoint to send request to + /// Specifies accept response media type + /// The returned + public async Task Delete(Uri uri, string accepts) + { + Ensure.ArgumentNotNull(uri, nameof(uri)); + Ensure.ArgumentNotNull(accepts, nameof(accepts)); + + var response = await Connection.Delete(uri, null, accepts).ConfigureAwait(false); + + return response.Body; + } + /// /// Performs an asynchronous HTTP DELETE request. /// Attempts to map the response body to an object of type diff --git a/Octokit/Http/IApiConnection.cs b/Octokit/Http/IApiConnection.cs index 1b28ae96..4dd71156 100644 --- a/Octokit/Http/IApiConnection.cs +++ b/Octokit/Http/IApiConnection.cs @@ -328,6 +328,16 @@ namespace Octokit /// The object to serialize as the body of the request Task Delete(Uri uri, object data); + /// + /// Performs an asynchronous HTTP DELETE request. + /// Attempts to map the response body to an object of type + /// + /// The API resource's type. + /// URI endpoint to send request to + /// Specifies accept response media type + /// The returned + Task Delete(Uri uri, string accepts); + /// /// Performs an asynchronous HTTP DELETE request. /// Attempts to map the response body to an object of type