// Matches any path of the pattern "/greetings/" [RestRoute("Get", "/greetings/{name}")] public async Task Greetings(IHttpContext context) { // Extract the name from the URL path. // UrlDecode ensures that spaces and special characters are in the right format. string name = WebUtility.UrlDecode(context.Request.PathParameters["name"]); await context.Response.SendResponseAsync($"Greetings, {name}!"); }