Exemple #1
0
        /**
         * 获取图片验证码方法
         *
         * @param  appKey:应用Id
         *
         * @return SMSImageCodeReslut
         **/
        public async Task <SMSImageCodeReslut> getImageCodeAsync(String appKey)
        {
            if (appKey == null)
            {
                throw new ArgumentNullException("Paramer 'appKey' is required");
            }

            String postStr = "";

            postStr = RongCloud.RONGCLOUDSMSURI + "/getImgCode.json";
            postStr = postStr + ("?appKey=") + (HttpUtility.UrlEncode(appKey == null ? "" : appKey));

            return((SMSImageCodeReslut)RongJsonUtil.JsonStringToObj <SMSImageCodeReslut>(await rongClient.ExecuteGetAsync(postStr)));
        }