mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 20:45:51 +00:00
Remove StatusCode property from ApiResponse
We really want ApiResponse to be a composite of IResponse and the deserialized content.
This commit is contained in:
@@ -343,16 +343,17 @@ namespace Octokit
|
||||
|
||||
var response = await Connection.GetResponse<T>(uri, cancellationToken);
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.Accepted)
|
||||
if (response.HttpResponse.StatusCode == HttpStatusCode.Accepted)
|
||||
{
|
||||
return await GetQueuedOperation<T>(uri, cancellationToken);
|
||||
}
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.OK)
|
||||
if (response.HttpResponse.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
return response.Body;
|
||||
}
|
||||
throw new ApiException("Queued Operations expect status codes of Accepted or OK.",response.StatusCode);
|
||||
throw new ApiException("Queued Operations expect status codes of Accepted or OK.",
|
||||
response.HttpResponse.StatusCode);
|
||||
}
|
||||
|
||||
async Task<IReadOnlyPagedCollection<T>> GetPage<T>(
|
||||
|
||||
Reference in New Issue
Block a user