using System; using System.Web; using System.Text.RegularExpressions; using System.Web.UI.HtmlControls; using System.IO; using System.IO.Compression; using System.Web.UI.WebControls; using System.Text; using System.Collections.Generic; namespace HH.WMS.Utils { /// /// WEB请求上下文信息工具类 /// public partial class ZHttp { #region 判断当前页面是否接收到了Post请求 /// /// 判断当前页面是否接收到了Post请求,如果当前请求不存在,返回false /// /// 是否接收到了Post请求 public static bool IsPost { get { return HttpContext.Current.Request.HttpMethod.Equals("POST"); } } #endregion #region 判断当前页面是否接收到了Get请求 /// /// 判断当前页面是否接收到了Get请求,如果当前请求不存在,返回 false /// /// 是否接收到了Get请求 public static bool IsGet { get { return HttpContext.Current.Request.HttpMethod.Equals("GET"); } } #endregion #region 获取客户端使用的HTTP数据传输方法 /// /// 获取客户端使用的HTTP数据传输方法 /// public static string Method { get { return HttpContext.Current.Request.HttpMethod; } } #endregion } }