diff --git a/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs b/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs index 57b030548a..04f0988a44 100644 --- a/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssuesLabelsClientTests.cs @@ -367,7 +367,7 @@ public void DeleteCorrectUrl() 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 @@ public void DeleteCorrectUrlWithRepositoryId() 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 9bb83f0668..aa8c514c09 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -510,6 +510,24 @@ public async Task Delete(Uri uri, object data) 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 1b28ae96d3..4dd711562b 100644 --- a/Octokit/Http/IApiConnection.cs +++ b/Octokit/Http/IApiConnection.cs @@ -328,6 +328,16 @@ public interface IApiConnection /// 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