Example #1
0
 /// <summary>
 /// 初始化APP
 /// </summary>
 /// <param name="cfgAppNodeName"></param>
 public TencBase(string cfgAppNodeName)
 {
     this.app          = TencConfig.GetConfigApp(cfgAppNodeName);
     base.ClientId     = this.app.AppKey;
     base.ClientSecret = this.app.AppSecret;
     base.RedirectUri  = this.app.RedirectUri;
     base.Scope        = this.app.Scope;
 }
Example #2
0
        /// <summary>
        /// 同步方式发起http post请求,可以同时上传文件
        /// </summary>
        /// <typeparam name="T">Json转自定义类型</typeparam>
        /// <param name="cfgApiNodeName">api子节点的Name</param>
        /// <param name="queryParas">请求参数列表</param>
        /// <returns>返回Json转自定义类型对象</returns>
        public static T HttpPostNameJsonWithFile <T>(string cfgApiNodeName, NameValueCollection queryParas, NameValueCollection files)
        {
            var url = TencConfig.GetConfigAPI(cfgApiNodeName);

            return(HttpPostUrlJsonWithFile <T>(url, queryParas, files));
        }
Example #3
0
        /// <summary>
        /// 同步方式发起http post请求
        /// </summary>
        /// <param name="cfgApiNodeName">api子节点的Name</param>
        /// <param name="queryParas">请求参数列表</param>
        /// <returns>返回json字符串</returns>
        public static string HttpPostName(string cfgApiNodeName, NameValueCollection queryParas)
        {
            var url = TencConfig.GetConfigAPI(cfgApiNodeName);

            return(HttpPostUrl(url, queryParas));
        }