This commit is contained in:
2025-09-13 13:08:54 +08:00
parent 4853c0c07c
commit c85a3f69f0
4 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ namespace BLL
public static string Http(string url, string method = "GET", string contenttype = "application/json;charset=utf-8", Hashtable header = null, string data = null)
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 |
SecurityProtocolType.Tls | SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls12;
SecurityProtocolType.Tls | SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls12;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = string.IsNullOrEmpty(method) ? "GET" : method;
request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype;