From 48b783333bd648e386eabfc81e95d95af329752f Mon Sep 17 00:00:00 2001 From: Simon Hornby Date: Mon, 4 Nov 2024 11:43:43 +0200 Subject: [PATCH] chore: only send the JSON header once when sending metrics and registration payloads (#254) --- src/Unleash/Communication/UnleashApiClient.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Unleash/Communication/UnleashApiClient.cs b/src/Unleash/Communication/UnleashApiClient.cs index caa575a..c64ee3b 100644 --- a/src/Unleash/Communication/UnleashApiClient.cs +++ b/src/Unleash/Communication/UnleashApiClient.cs @@ -190,7 +190,6 @@ public async Task RegisterClient(ClientRegistration registration, Cancella using (var request = new HttpRequestMessage(HttpMethod.Post, requestUri)) { request.Content = new StringContent(JsonSerializer.Serialize(registration, options), Encoding.UTF8, "application/json"); - request.Content.Headers.AddContentTypeJson(); SetRequestHeaders(request, clientRequestHeaders); @@ -230,7 +229,6 @@ public async Task SendMetrics(Yggdrasil.MetricsBucket metrics, Cancellatio using (var request = new HttpRequestMessage(HttpMethod.Post, requestUri)) { request.Content = new StringContent(JsonSerializer.Serialize(clientMetrics, options), Encoding.UTF8, "application/json"); - request.Content.Headers.AddContentTypeJson(); SetRequestHeaders(request, clientRequestHeaders);