Exemplo n.º 1
0
        /// <summary>
        /// Get方法执行函数
        /// </summary>
        public void Get()
        {
            CallInterFace api     = new CallInterFace();
            string        Url     = ApiPlugin.RobotConfig.InterfaceUrl + "?Copyright=" + ApiPlugin.RobotConfig.RobotKey + "&RobotQQ=" + ApiPlugin.RobotConfig.QQNumber + "&Port=" + ApiPlugin.RobotConfig.ApiPort;
            string        Result  = api.GetData(Url, ApiPlugin.RobotConfig.InterfaceEncoder);
            Hashtable     GetData = ApiPlugin.GetGetData(Result);
            string        Bianma  = "GB2312";

            if (GetData.ContainsKey("utf"))
            {
                if (GetData["utf"].ToString() == "1")
                {
                    Bianma = "UTF-8";
                }
            }
            string Data = string.Empty;

            try
            {
                Data = ApiPlugin.Api(GetData, Bianma);
            }
            catch
            {
                Data = "数据出错!请返回检查!";
            }
        }