示例#1
0
        public static ResultDTO Get(string method, string reqParams = "")
        {
            ResultDTO resultDTO = new ResultDTO()
            {
                status = false, info = false
            };
            string url = method.StartsWith("http://", StringComparison.InvariantCultureIgnoreCase) ? method : AppSettingService.apiUrl + method;

            try
            {
                resultDTO = BaseHttpClient.SendRequest(RequestMode.Get, url, reqParams);
            }
            catch (Exception e) { }
            return(resultDTO);
        }
示例#2
0
        public static ResultDTO Delete(string method, List <object> list)
        {
            ResultDTO resultDTO = new ResultDTO()
            {
                status = false, info = false
            };
            string url = method.StartsWith("http://", StringComparison.InvariantCultureIgnoreCase) ? method : AppSettingService.apiUrl + method;

            try
            {
                string data = JsonHelper.ToJson(list);
                resultDTO = BaseHttpClient.SendRequest(RequestMode.Delete, url, data);
            }
            catch (Exception e) { }
            return(resultDTO);
        }