From e8f208232645c3284842b2d5ea30626aa66ddb67 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 13 May 2025 12:10:14 +0800 Subject: [PATCH] test . --- .../Organization/Controllers/GainfoFacesController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs b/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs index 28062e96..c5a4b5dd 100644 --- a/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs +++ b/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs @@ -52,7 +52,7 @@ public class GainfoFacesController : ControllerBase var headers = InitRequest(url, body, key, secret); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(headers["Accept"])); - var content = new StringContent(body, Encoding.UTF8, headers["Content-Type"]); + var content = new StringContent(body, Encoding.UTF8, "application/json"); foreach (var item in headers.Where(x => x.Key != "Accept").Where(x => x.Key != "Content-Type")) { content.Headers.Add(item.Key, item.Value); @@ -67,10 +67,10 @@ public class GainfoFacesController : ControllerBase var header = new Dictionary(); // Accept - header.Add("Accept", "application/json"); + header.Add("Accept", "application/json;"); // ContentType - header.Add("Content-Type", "application/json"); + header.Add("Content-Type", "application/json; charset=utf-8"); //if POST content-md5,be careful it must be lower case. string contentMd5 = computeContentMd5(body);