Example #1
0
        public static T DoPostWithUrl <T>(string url, IDictionary <string, object> para, IDictionary <string, string> headers = null) where T : ResponseBase
        {
            if (headers == null)
            {
                headers = new Dictionary <string, string>();
            }
            headers["session"] = ServiceContainer.AccessToken;
            string json = MsHttpRestful.PostJsonBodyReturnString(ServiceContainer.ServerAddress + "/" + url, para, Encoding.UTF8, headers);

            return(DeserializeObject <T>(json));
        }