Skip to content

Instantly share code, notes, and snippets.

@UltiRequiem
Created December 16, 2021 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UltiRequiem/b6796e05ee2d9bb5e76893e2712751a6 to your computer and use it in GitHub Desktop.
Save UltiRequiem/b6796e05ee2d9bb5e76893e2712751a6 to your computer and use it in GitHub Desktop.
Minimal API
var app = WebApplication.Create(args);
app.MapGet("/reverse/{text}", RouteHandlers.Reverse);
app.Run();
internal static class RouteHandlers
{
public static string Reverse(string text)
{
return new string(text.ToCharArray().Reverse().ToArray());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment