Created
March 21, 2024 19:37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ProductsGet | |
{ | |
[FunctionName("products-get")] | |
public static async Task<IActionResult> Get( | |
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "products")] HttpRequest req, | |
ILogger log) | |
{ | |
return new OkObjectResult(new List<Product> { new Product(10, "T-Shirt", "SWA fanclub branded T-Shirt", 1), | |
new Product(20, "Mug", "SWA fanclub branded Mug", 1), | |
new Product(30, "Poster", "SWA fanclub branded Poster", 1)}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment