Пример #1
0
        public async Task <bool> UpdateSyntheticMonitorV1Async(string monitorId, SyntheticMonitorUpdate body, CancellationToken cancellationToken = default)
        {
            var response = await GetSyntheticMonitorsV1Url()
                           .AppendPathSegment(monitorId)
                           .PutJsonAsync(body, cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
Пример #2
0
        public async Task <EntityIdDto> CreateSyntheticMonitorV1Async(SyntheticMonitorUpdate body, CancellationToken cancellationToken = default)
        {
            var response = await GetSyntheticMonitorsV1Url()
                           .PostJsonAsync(body, cancellationToken)
                           .ReceiveJsonWithErrorChecking <EntityIdDto>()
                           .ConfigureAwait(false);

            return(response);
        }