Removes redundant content-type header
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s

Removes the explicit setting of the "Content-Type" header,
as HttpClient handles this automatically based on the content being sent.

This change simplifies the code and avoids potential conflicts
if the content type is already being set elsewhere.
This commit is contained in:
2025-08-17 12:18:38 +02:00
parent 0ac37d198c
commit 701b578b71

View File

@@ -248,7 +248,6 @@ if (app.Environment.IsDevelopment())
HttpClient client = httpClientFactory.CreateClient("InsecureClient");
client.BaseAddress = new Uri("https://tesla_command_proxy");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {access_token}");
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
//Get cars
VehiclesEnvelope? vehiclesEnvelope = await client.GetFromJsonAsync<VehiclesEnvelope>("/api/1/vehicles");