diff --git a/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs b/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs index a2a90c9b..ea65c89f 100644 --- a/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs +++ b/Src/Dlhis.Basic/Organization/Controllers/GainfoFacesController.cs @@ -1,4 +1,5 @@ -using System.Security.Cryptography; +using System.Net.Http.Headers; +using System.Security.Cryptography; using System.Text; using Dlhis.Basic.Organization.Request; using Dlhis.Basic.Organization.Response; @@ -49,10 +50,10 @@ public class GainfoFacesController : ControllerBase var secret = "MLl7Dv7p5Pgc9XYI3r4O"; 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); - foreach (var item in headers) + foreach (var item in headers.Where(x => x.Key != "Accept")) { content.Headers.Add(item.Key, item.Value); }