From 701b578b718483bbca4f976d214f7dda07f67aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szak=C3=A1ts=20Alp=C3=A1r=20Zsolt?= Date: Sun, 17 Aug 2025 12:18:38 +0200 Subject: [PATCH] Removes redundant content-type header 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. --- Source/ProofOfConcept/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/ProofOfConcept/Program.cs b/Source/ProofOfConcept/Program.cs index 7428967..af580e8 100644 --- a/Source/ProofOfConcept/Program.cs +++ b/Source/ProofOfConcept/Program.cs @@ -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("/api/1/vehicles");