示例#1
0
        private JObject RequestPost(string url, string data)
        {
            RequestArgs mArgsResponse = new RequestArgs
            {
                Encode   = "utf-8",
                Method   = "POST",
                Url      = url,
                postData = data
            };
            var returnData = CWebRequest.GetPost(mArgsResponse);

            if (!string.IsNullOrEmpty(returnData))
            {
                return(JsonConvert.DeserializeObject <JObject>(returnData));
            }

            return(null);
        }
示例#2
0
        /// <summary>
        /// 请求帮助方法
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        private JObject RequestGet(string url)
        {
            var mArgs = new RequestArgs
            {
                Encode = "utf-8",
                Method = "GET",
                Url    = url
            };


            var returnData = CWebRequest.GetPost(mArgs);

            if (!string.IsNullOrEmpty(returnData))
            {
                return(JsonConvert.DeserializeObject <JObject>(returnData));
            }

            return(null);
        }