mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
[WIP] Add new Project API Preview (#1480)
Add Projects API client (preview)
This commit is contained in:
committed by
Ryan Gribble
parent
fc5bc947aa
commit
329ef960ed
@@ -222,6 +222,14 @@ namespace Octokit
|
||||
return response.HttpResponse.StatusCode;
|
||||
}
|
||||
|
||||
public async Task<HttpStatusCode> Post(Uri uri, object body, string accepts)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
var response = await SendData<object>(uri, HttpMethod.Post, body, accepts, null, CancellationToken.None).ConfigureAwait(false);
|
||||
return response.HttpResponse.StatusCode;
|
||||
}
|
||||
|
||||
public Task<IApiResponse<T>> Post<T>(Uri uri)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
@@ -96,9 +96,18 @@ namespace Octokit
|
||||
/// Performs an asynchronous HTTP POST request.
|
||||
/// </summary>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <returns><seealso cref="IResponse"/> representing the received HTTP response</returns>
|
||||
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
|
||||
Task<HttpStatusCode> Post(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP POST request.
|
||||
/// </summary>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <param name="body">The object to serialize as the body of the request</param>
|
||||
/// <param name="accepts">Specifies accepted response media types.</param>
|
||||
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
|
||||
Task<HttpStatusCode> Post(Uri uri, object body, string accepts);
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP POST request.
|
||||
/// Attempts to map the response body to an object of type <typeparamref name="T"/>
|
||||
|
||||
Reference in New Issue
Block a user