Esempio n. 1
0
 /// <summary>
 /// 初始化
 /// </summary>
 /// <param name="config"></param>
 public static void InitConfig()
 {
     EMayConfig = Config.Bind <EMayConfig>("Service.json", "Emay");
     if (!HttpHelper.Header.ContainsKey("appId"))
     {
         HttpHelper.Header.Add("appId", EMayConfig.AppId);
     }
     if (EMayConfig.IsCompress)
     {
         HttpHelper.Header.Add("gzip", "on");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 初始化
 /// </summary>
 /// <param name="config"></param>
 public static void InitConfig(string config)
 {
     EMayConfig = EMayConfiguration.Bind <EMayConfig>(config);
     if (!HttpHelper.Header.ContainsKey("appId"))
     {
         HttpHelper.Header.Add("appId", EMayConfig.AppId);
     }
     if (EMayConfig.IsCompress)
     {
         HttpHelper.Header.Add("gzip", "on");
     }
 }