public async Task <ActionResult <RemoteUrlStatus> > ValidateUrl([FromQuery] string url,
                                                                        [FromQuery] bool deep = false)
        {
            try {
                var result = await _processService.ValidateUrl(url, UserId, deep);

                return(Ok(result));
            } catch (UrlParseException) {
                return(NoContent());
            } catch (NoKeyAvailableException) {
                return(StatusCode(417)); //HttpStatusCode.ExpectationFailed
            } catch (ExpiredKeyException) {
                return(StatusCode(417)); //HttpStatusCode.ExpectationFailed
            }
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <RemoteUrlStatus> > ValidateUrl([FromQuery] string url)
        {
            try {
                var result = await _processService.ValidateUrl(url, "PUBLICAPIREQUEST");

                return(Ok(result));
            } catch (UrlParseException) {
                return(NoContent());
            }
        }