Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created March 21, 2024 19:37
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