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)); }
public KeystoneContainer(KeystoneClientConfig config) { this.config = config; }