/// <summary>发送同步请求</summary> /// <param name="requestData">请求的数据</param> /// <param name="httpMethod">请求的方式( GET | POST )</param> /// <param name="contentType">内容类型</param> /// <param name="content">内容</param> public static string Request(AjaxRequestData requestData, string httpMethod, string contentType, string content) { AjaxRequest request = new AjaxRequest(requestData); AjaxResponseData response = request.Request(requestData.ActionUri, httpMethod, contentType, content); return(response.ResponseText); }
// ------------------------------------------------------- // 静态方法 // ------------------------------------------------------- #region 静态函数:Request(AjaxRequestData requestData) /// <summary>发送同步请求</summary> /// <param name="requestData">请求的数据信息</param> public static string Request(AjaxRequestData requestData) { AjaxRequest request = new AjaxRequest(requestData); AjaxResponseData response = request.Request(requestData.ActionUri, "POST"); return(response.ResponseText); }