usingHh.Mes.Common;usingHh.Mes.Common.Http;usingHh.Mes.Common.log;usingHh.Mes.Pojo.System;usingMicrosoft.AspNetCore.Mvc;usingSystem;usingSystem.IO;usingSystem.Linq;namespaceWebMvc.Areas.Planned.Controllers{[Area("Planned")]publicclassToolController:Controller{#regionpostmanpublicIActionResultIndex(){returnView();}[HttpPost]publicstringPostMan(HttpItemhttpItem){varresponse=HttpSend(httpItem);returnresponse;}privatestringHttpSend(HttpItemhttpItem){if(string.IsNullOrEmpty(httpItem.URL))return"{\"error\":\"URL is null\"}";varmethod=httpItem.Method;varitem=newHttpItem(){URL=httpItem.URL,Method=method,Referer=httpItem.Referer};if(method.ToUpper()=="POST"){if(string.IsNullOrEmpty(httpItem.Postdata))return"{\"error\":\"The option is post, and the parameter【Postdata】cannot be empty\"}";item.Postdata=httpItem.Postdata;item.ContentType=httpItem.ContentType;}if(!string.IsNullOrEmpty(httpItem.Referer))item.Referer=httpItem.Referer;//设置head信息if(!string.IsNullOrEmpty(httpItem.HeaderStr)){vararr=httpItem.HeaderStr.ToString().Split("&$");foreach(varvalueinarr){vartemp=value.Split(":");item.Header.Add(temp[0],temp[1]);}}varhttp=newHttpHelper();varresult=http.GetHtml(item);returnresult.Html;}#endregion#regionjosn美化publicIActionResultJosnIndex(){returnView();}#endregion#region系统监控publicIActionResultMonitor(){