Exemplo n.º 1
0
        public static async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log)
        {
            log.LogInformation("C# HTTP trigger function processed a request.");

            string  json    = await new StreamReader(req.Body).ReadToEndAsync();
            dynamic content = JsonConvert.DeserializeObject <dynamic>(json);

            var result = await _moderatorService.ScoreText(content["Description"].ToString());

            return((ActionResult) new OkObjectResult(result));
        }