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);