Пример #1
0
        public async Task PutApiKeyAsync(string name, ApiKeyDefinition apiKeyData,
                                         CancellationToken token = default(CancellationToken))
        {
            using (var request = adminRequest.CreatePutApiKeyRequest(name))
            {
                await
                request.WriteAsync(RavenJObject.FromObject(apiKeyData))
                .WithCancellation(token)
                .ConfigureAwait(false);

                await request.ReadResponseJsonAsync().WithCancellation(token).ConfigureAwait(false);
            }
        }