上传系统接口增加token
This commit is contained in:
@ -12,6 +12,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using WCS.BLL;
|
||||
using WCS.BLL.Config;
|
||||
using WCS.Model;
|
||||
|
||||
namespace WCS.BLL.Tool
|
||||
@ -280,6 +281,7 @@ namespace WCS.BLL.Tool
|
||||
if (isSaveLog)
|
||||
Logs.Write($"【{guid}】开始请求调用接口 url:{url} 请求方式:{httpMethod} 数据:{data}", LogsType.Api);
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Headers.Add("token",LocalStatic.WMSToken);//智能制造要求请求增加token
|
||||
request.Method = httpMethod;
|
||||
request.ContentType = "application/json";
|
||||
request.Timeout = 10000;
|
||||
@ -324,7 +326,7 @@ namespace WCS.BLL.Tool
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Method = httpMethod;
|
||||
request.ContentType = "application/json";
|
||||
request.Timeout = 2000;
|
||||
request.Timeout = 3000;
|
||||
|
||||
if (!string.IsNullOrEmpty(data))
|
||||
{
|
||||
|
Reference in New Issue
Block a user