From 2ac500ba2cb30fbb4e1915236af90c56a728f6d8 Mon Sep 17 00:00:00 2001 From: Haroon Date: Thu, 14 Nov 2013 08:30:02 +0000 Subject: [PATCH] Added Task Put(Uri uri) --- Octokit/Http/ApiConnection.cs | 12 ++++++++++++ Octokit/Http/IApiConnection.cs | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs index 1703f253..8a4a859d 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -166,6 +166,18 @@ namespace Octokit return response.BodyAsObject; } + /// + /// Puts the API object at the specified URI. + /// + /// URI of the API resource to put + /// A for the request's execution. + public Task Delete(Uri uri) + { + Ensure.ArgumentNotNull(uri, "uri"); + + return Connection.PutAsync(uri); + } + /// /// Creates or replaces the API resource at the specified URI. /// diff --git a/Octokit/Http/IApiConnection.cs b/Octokit/Http/IApiConnection.cs index 1c73d21d..0b103918 100644 --- a/Octokit/Http/IApiConnection.cs +++ b/Octokit/Http/IApiConnection.cs @@ -100,6 +100,13 @@ namespace Octokit /// Thrown when an API error occurs. Task Post(Uri uri, object data, string accepts, string contentType); + /// + /// PUTS the API object at the specified URI. + /// + /// URI of the API resource to delete + /// A for the request's execution. + Task Put(Uri uri); + /// /// Creates or replaces the API resource at the specified URI. ///