using BHJD.DBdll.Public; using Cysharp.Threading.Tasks; namespace SimulationServer.Utils; public class HttpManager { public static async UniTask Post(string url, string json) { HttpClient client = new HttpClient(); HttpContent content = new StringContent(json); content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); HttpResponseMessage response = await client.PostAsync(url, content); return await response.Content.ReadAsStringAsync(); } public static string Get(string url, List key,List value) { IHttpHelper.HttpCmd type = new IHttpHelper.HttpCmd { m_RequestType = IHttpHelper.HttpRequestType.GET, m_Addr = url, m_Args = key }; HttpHelper httpHelper = new HttpHelper(); return httpHelper.Request(type, value); } }