Пример #1
0
        public object Get(VerifyCode verifyRequest)
        {
            var phone = base.Request.QueryString["phone"];
            var code  = base.Request.QueryString["verifycode"];

            return(new VerifyCodeResponse()
            {
                VerifyResult = phone == code
            });
        }
Пример #2
0
        public object Post(VerifyCode verifyRequest)
        {
            var phone = verifyRequest.Phone;

            // generate random number and save it to cache for a short period.

            return(new VerifyCodeResponse()
            {
                VerifyResult = !string.IsNullOrEmpty(phone), ReponseStatus = null
            });
        }