Пример #1
0
        public RestResponse <T> GetKeystone <T>(KeystoneClientConfig config) where T : class
        {
            Keystone            keystone    = new Keystone(config.Tenant, config.Username, config.Password);
            HttpClient          client      = new HttpClient();
            HttpContent         contentPost = new StringContent(JSON.Generate(keystone), Encoding.UTF8, "application/json");
            String              uri         = config.Server.TrimEnd('/') + "/tokens";
            HttpResponseMessage response    = client.PostAsync(uri, contentPost).Result;

            return(new RestResponse <T>(response));
        }
Пример #2
0
 public KeystoneContainer(KeystoneClientConfig config)
 {
     this.config = config;
 }