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