/// <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)); }
/// <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)); }