コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }