mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:17:22 +01:00
bump version and make ct not optional
This commit is contained in:
parent
6c3716516e
commit
523135c5b2
2 changed files with 5 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>0.6.6</Version>
|
||||
<Version>0.6.7</Version>
|
||||
<Description></Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||
|
|
|
|||
|
|
@ -205,13 +205,13 @@ public partial class ApiController
|
|||
}
|
||||
}
|
||||
|
||||
private async Task<HttpResponseMessage> SendRequestAsync(HttpMethod method, Uri uri, CancellationToken? ct = null)
|
||||
private async Task<HttpResponseMessage> SendRequestAsync(HttpMethod method, Uri uri, CancellationToken ct)
|
||||
{
|
||||
using var requestMessage = new HttpRequestMessage(method, uri);
|
||||
return await SendRequestInternalAsync(requestMessage, ct).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async Task<HttpResponseMessage> SendRequestInternalAsync(HttpRequestMessage requestMessage, CancellationToken? ct = null)
|
||||
private async Task<HttpResponseMessage> SendRequestInternalAsync(HttpRequestMessage requestMessage, CancellationToken ct)
|
||||
{
|
||||
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", this.Authorization);
|
||||
|
||||
|
|
@ -224,13 +224,10 @@ public partial class ApiController
|
|||
Logger.Debug("Sending " + requestMessage.Method + " to " + requestMessage.RequestUri);
|
||||
}
|
||||
|
||||
if (ct.HasValue)
|
||||
return await _httpClient.SendAsync(requestMessage, ct.Value).ConfigureAwait(false);
|
||||
|
||||
return await _httpClient.SendAsync(requestMessage).ConfigureAwait(false);
|
||||
return await _httpClient.SendAsync(requestMessage, ct).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async Task<HttpResponseMessage> SendRequestAsync<T>(HttpMethod method, Uri uri, T content, CancellationToken? ct = null) where T : class
|
||||
private async Task<HttpResponseMessage> SendRequestAsync<T>(HttpMethod method, Uri uri, T content, CancellationToken ct) where T : class
|
||||
{
|
||||
using var requestMessage = new HttpRequestMessage(method, uri);
|
||||
requestMessage.Content = JsonContent.Create(content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue