Files
2025-12-11 14:04:39 +08:00

26 lines
713 B
C#

using RestSharp;
namespace IotManager.Common
{
public class HttpRequest
{
public static string BaseUrl = "";
public bool SendHttpRequest(string Url,List<string> paramlist)
{
var options = new RestClientOptions(BaseUrl);
var client = new RestClient(options);
var request = new RestRequest("api/login/Helloooo");
request.AddParameter("key", "j76R2968V^aw%2;2");
RestResponse response = client.ExecutePost(request);
string? allow_or_deny = response.Content;
if (allow_or_deny.Equals("allow"))
{
return true;
}
return false;
}
}
}