public static byte[] Post(string modelName, string method, User user, byte[] bytes, Dictionary <string, string> param = null) { var url = GetForwardUrl(modelName, method); if (param == null) { param = new Dictionary <string, string>(); } if (bytes == null) { bytes = new byte[0]; } var headers = Kooboo.Data.Service.TwoFactorService.GetHeaders(user.Id); if (param != null) { foreach (var p in param) { if (!headers.ContainsKey(p.Key)) { headers[p.Key] = p.Value; } } } return(EmailHttpHelper.PostBytes(url, bytes, headers)); }
public static T Post <T>(string modelName, string method, User user, Dictionary <string, string> param) { var url = GetForwardUrl(modelName, method); var headers = TwoFactorUserCache.GetHeaders(user.Id); return(EmailHttpHelper.Post <T>(url, param, headers)); }
public static T Get <T>(string modelName, string method, User user, Dictionary <string, string> param = null) { var url = GetForwardUrl(modelName, method); var headers = Kooboo.Data.Service.TwoFactorService.GetHeaders(user); return(EmailHttpHelper.Get <T>(url, param, headers)); }
public static T Post <T>(string modelName, string method, User user, byte[] bytes, Dictionary <string, string> param = null) { var url = GetForwardUrl(modelName, method); var headers = TwoFactorUserCache.GetHeaders(user.Id); if (param != null) { foreach (var p in param) { if (!headers.ContainsKey(p.Key)) { headers[p.Key] = p.Value; } } } return(EmailHttpHelper.Post <T>(url, headers, bytes)); }