Пример #1
0
        public async Task <bool> UpdateRequestNamingAsync(string id, RequestNaming body = null, CancellationToken cancellationToken = default)
        {
            var response = await GetRequestNamingRulesUrl()
                           .AppendPathSegment(id)
                           .PutJsonAsync(body, cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
Пример #2
0
        public async Task <EntityShortRepresentation> CreateRequestNamingAsync(RequestNaming body = null, CancellationToken cancellationToken = default)
        {
            var response = await GetRequestNamingRulesUrl()
                           .PostJsonAsync(body, cancellationToken)
                           .ReceiveJsonWithErrorChecking <EntityShortRepresentation>()
                           .ConfigureAwait(false);

            return(response);
        }