Esempio n. 1
0
        public static string getAction()
        {
            ifWriteToPage = false;
            string _action = HttpContext.Current.Request["action"];

            if (isNullEmpty(_action))
            {
                _action = HttpContext.Current.Request["api"];
            }
            if (isNullEmpty(_action))
            {
                writeToPage(getErrorMsg("缺少接口名参数(action or api)"));
            }
            try { MSession.setClientKey(HttpContext.Current.Request["clientkey"].ToString()); } catch (Exception) { };
            return(_action);
        }
Esempio n. 2
0
        public static string getAction(string args)
        {
            ifWriteToPage = false;
            string _action = String.Empty;

            try
            {
                _action = HttpContext.Current.Request[args].ToString();
                MSession.setClientKey(HttpContext.Current.Request["clientkey"].ToString());
                if (isNullEmpty(_action))
                {
                    writeToPage(getErrorMsg("缺少接口名参数(action or api)"));
                }
            }
            catch (Exception) {
                writeToPage(getErrorMsg("缺少接口名参数(action or api)"));
            }
            return(_action);
        }