Ejemplo n.º 1
0
        public static async Task <IActionResult> Test3(
            [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            string doc = req.Query["doc"];

            using var service = new GoogleService(doc);

            try
            {
                var result = await service.CreateSheet().ConfigureAwait(false);

                return(new OkObjectResult(result));
            }
            catch (Exception ex)
            {
                log.LogInformation(ex.ToString());
                return(new BadRequestObjectResult(ex.ToString()));
            }
        }