public async Task <CalculatedServiceMetric> AddCalculatedServiceMetricAsync(CalculatedServiceMetric body, CancellationToken cancellationToken = default) { var response = await GetCalculatedMetricsServiceUrl() .PostJsonAsync(body, cancellationToken) .ReceiveJsonWithErrorChecking <CalculatedServiceMetric>() .ConfigureAwait(false); return(response); }
public async Task <bool> UpdateCalculatedServiceMetricAsync(string metricKey, CalculatedServiceMetric body, CancellationToken cancellationToken = default) { var response = await GetCalculatedMetricsServiceUrl() .AppendPathSegment(metricKey) .PutJsonAsync(body, cancellationToken) .ConfigureAwait(false); return(response.IsSuccessStatusCode); }