This commit is contained in:
2025-05-13 11:55:50 +08:00
parent fd91cfe8c8
commit b5772df127

View File

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