Properly migrate all HttpCompletionOption

This commit is contained in:
crobibero
2020-09-01 07:51:06 -06:00
parent 8d592777c4
commit 4038d15c83
7 changed files with 15 additions and 14 deletions

View File

@@ -1299,7 +1299,7 @@ namespace Emby.Server.Implementations
{
using var request = new HttpRequestMessage(HttpMethod.Post, apiUrl);
using var response = await _httpClientFactory.CreateClient(NamedClient.Default)
.SendAsync(request, cancellationToken).ConfigureAwait(false);
.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
var result = await System.Text.Json.JsonSerializer.DeserializeAsync<string>(stream, JsonDefaults.GetOptions(), cancellationToken).ConfigureAwait(false);