mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
Add new PUT method onto IConnection
This commit is contained in:
@@ -205,6 +205,19 @@ namespace Octokit
|
||||
return Run<T>(request);
|
||||
}
|
||||
|
||||
public async Task<HttpStatusCode> PutAsync(Uri uri)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
var response = await Run<object>(new Request
|
||||
{
|
||||
Method = HttpMethod.Put,
|
||||
BaseAddress = BaseAddress,
|
||||
Endpoint = uri
|
||||
});
|
||||
return response.StatusCode;
|
||||
}
|
||||
|
||||
public async Task<HttpStatusCode> DeleteAsync(Uri uri)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace Octokit
|
||||
Task<IResponse<T>> PostAsync<T>(Uri uri, object body, string accepts, string contentType);
|
||||
Task<IResponse<T>> PutAsync<T>(Uri uri, object body);
|
||||
Task<IResponse<T>> PutAsync<T>(Uri uri, object body, string twoFactorAuthenticationCode);
|
||||
|
||||
Task<HttpStatusCode> PutAsync(Uri uri);
|
||||
|
||||
Task<HttpStatusCode> DeleteAsync(Uri uri);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user