Created
December 16, 2021 16:18
-
-
Save UltiRequiem/b6796e05ee2d9bb5e76893e2712751a6 to your computer and use it in GitHub Desktop.
Minimal API
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
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