Example #1
0
        public T DoGet <T>(IWxApiGetRequest <T> request) where T : WxApiBaseResult
        {
            string   realServerUrl = GetServerUrl(this.serverUrl, request.ApiName);
            WebUtils webUtils      = new WebUtils();
            string   body          = webUtils.DoGet(realServerUrl, request.GetUrlParameters(), null);
            T        rsp           = JsonConvert.DeserializeObject <T>(body);


            return(rsp);
        }
Example #2
0
        public T DoGet <T>(IWxApiGetRequest <T> request) where T : WxApiBaseResult
        {
            string   realServerUrl = request.ApiUrl;
            WebUtils webUtils      = new WebUtils();
            string   body          = webUtils.DoGet(realServerUrl, request.GetUrlParameters(), null);

            log.InfoFormat("WeiXinSdk-Get->{0}", body);
            T rsp = JsonConvert.DeserializeObject <T>(body);


            return(rsp);
        }