This commit is contained in:
parent
4dab9292a4
commit
4051dc6b52
|
@ -12,6 +12,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Api.Framework.Cps
|
namespace Api.Framework.Cps
|
||||||
{
|
{
|
||||||
|
@ -207,7 +208,7 @@ namespace Api.Framework.Cps
|
||||||
Host = CpsClient._host + "api/" + target + "/send_data",
|
Host = CpsClient._host + "api/" + target + "/send_data",
|
||||||
Method = method
|
Method = method
|
||||||
};
|
};
|
||||||
|
|
||||||
if (param != null)
|
if (param != null)
|
||||||
{
|
{
|
||||||
var _param = param.GetType().GetProperties();
|
var _param = param.GetType().GetProperties();
|
||||||
|
@ -217,13 +218,15 @@ namespace Api.Framework.Cps
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HttpHelper http = new HttpHelper();
|
HttpHelper http = new HttpHelper();
|
||||||
|
WebResult result = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//var ss = http.SendData(end);
|
result = http.SendData(end);
|
||||||
return http.SendData(end);
|
return result;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
LogHelper.GetSingleObj().Error("cps请求异常", ex.Message + $"{result?.message} => {JsonConvert.SerializeObject(end)}");
|
||||||
if (ex.Message == "未将对象引用设置到对象的实例。")
|
if (ex.Message == "未将对象引用设置到对象的实例。")
|
||||||
return null;
|
return null;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue