mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 12:26:18 +00:00
Handle NoContent response for queued operations
We didn't handle the 204 response properly for the `StatisticsClient`. Now we do. Fixes #836
This commit is contained in:
@@ -444,6 +444,8 @@ namespace Octokit
|
||||
{
|
||||
case HttpStatusCode.Accepted:
|
||||
continue;
|
||||
case HttpStatusCode.NoContent:
|
||||
return default(T);
|
||||
case HttpStatusCode.OK:
|
||||
return response.Body;
|
||||
}
|
||||
|
||||
@@ -262,6 +262,6 @@ namespace Octokit
|
||||
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||
/// <returns>The updated API resource.</returns>
|
||||
/// <exception cref="ApiException">Thrown when an API error occurs.</exception>
|
||||
Task<T> GetQueuedOperation<T>(Uri uri,CancellationToken cancellationToken);
|
||||
Task<T> GetQueuedOperation<T>(Uri uri, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user