请求钉钉
var obj="";
var token = AccessToken();
if (string.IsNullOrWhiteSpace(token))
{
return false;
}
var client = new RestClient($"https://api.dingtalk.com/v1.0/workflow/processInstances?processInstanceId={processInstanceId}");
var request = new RestRequest(Method.GET);
request.AddHeader("x-acs-dingtalk-access-token", $"{token}");
request.AddParameter("application/json", null, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
if (response.StatusCode==HttpStatusCode.OK)
{
obj= response.Content;
return true;
}
return false;
///获取参数值
string resultJson = obj.ToString();
var job = resultJson.ToJObject()["result"];
var result = job?["result"]?.ToString();
var status = job?["status"]?.ToString();