4 ms·
Same thought! Python uses FastAPI. C# with ASP.NET looks similarly terse, and ASP.NET is “built in” (kinda). var app = WebApplication.Create(); app.MapGet("/p
by cpfohl 2y ago
Same thought! Python uses FastAPI. C# with ASP.NET looks similarly terse, and ASP.NET is “built in” (kinda).
var app = WebApplication.Create();
app.MapGet("/people", () => new[]
{
new Person("Ana"), new Person("Filipe"), new Person("Emillia")
});
app.Run();
record Person(string Name);
The above (struggling to find the backtick on my Mobile keyboard) is straight from the ASP.NET website: https://dotnet.microsoft.com/en-us/apps/aspnet/apis https://dotnet.microsoft.com/en-us/apps/aspnet/apis
- neonsunset 2y agoFor some reason the repo uses outdated Mono (which is limited to ancient .NET Framework APIs and old C# version) which could be the culprit. In any case - https://github.com/begoon/http-server/pull/1 https://github.com/begoon/http-server/pull/1