Ejemplo n.º 1
0
        /**
         * 更新昵称
         */
        public void nickname(string nickname, Action <Error, string> action)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("nickname", nickname);

            HttpUtil.Http.Post(URLManager.postNickname()).Form(dic).OnSuccess(result =>
            {
                if (result != null)
                {
                    action(null, nickname);
                }
            }).OnFail(result =>
            {
                if (action != null)
                {
                    action(new Error(500, null), null);
                }
            }).Go();
        }