Revert "Remove ResponseHeadersRead where applicable"

This reverts commit 85844a84b6.
This commit is contained in:
crobibero
2020-09-03 07:20:33 -06:00
parent 85844a84b6
commit d8a0edc511
5 changed files with 11 additions and 8 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);