Merge branch 'master' of http://47.104.102.122:3000/lpf/SGGL_SeDin_New
This commit is contained in:
@@ -1446,6 +1446,28 @@ namespace BLL
|
||||
return response.Content;
|
||||
}
|
||||
|
||||
public static string RequestPost(string Baseurl, Dictionary<string ,string> Token, string JsonBody)
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
var client = new RestClient(Baseurl);
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.POST);
|
||||
foreach (var item in Token)
|
||||
{
|
||||
request.AddHeader(item.Key, item.Value);
|
||||
}
|
||||
request.AddHeader("ClientId", SysConstSetService.ClientId);
|
||||
request.AddHeader("OperationCode", Baseurl.Substring(Baseurl.LastIndexOf("/", StringComparison.Ordinal) + 1));
|
||||
if (!string.IsNullOrEmpty(JsonBody))
|
||||
{
|
||||
request.AddJsonBody(JsonBody);
|
||||
}
|
||||
|
||||
IRestResponse response = client.Execute(request);
|
||||
return response.Content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据星期几返回值
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user