diff --git a/Beam.Api/ApiCall.cs b/Beam.Api/ApiCall.cs index d559725..547348a 100644 --- a/Beam.Api/ApiCall.cs +++ b/Beam.Api/ApiCall.cs @@ -35,8 +35,9 @@ namespace Beam.Api; foreach (var header in Headers) request.Headers.Add(header.Key, header.Value); + logger?.LogInformation("Fetching '{}' with method '{}', content-type '{}', and headers '{}'", Uri, Method, ContentType, JsonSerializer.Serialize(request.Headers.ToDictionary())); - var response = await Client.SendAsync(request, ct); + var response = await Client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, ct); if (tries is not null && tries?.@try < tries?.max && !SuccessCodes.Contains(response.StatusCode)) { await Task.Delay((int)Math.Min(Math.Pow(2, tries.Value.@try), 60) * 1000, ct);