示例#1
0
        public async Task <IActionResult> FindLinksInText([FromBody] string data,
                                                          CancellationToken cancellationToken)
        {
            var stopWatch = new Stopwatch();

            stopWatch.Start();

            if (string.IsNullOrWhiteSpace(data))
            {
                return(NoContent());
            }

            var result = await _finderService.FindAllLinks(data,
                                                           cancellationToken : cancellationToken);

            stopWatch.Stop();
            _logger.LogInformation($"Request has been proceeded in {stopWatch.Elapsed.Seconds}");

            return(Ok(result));
        }