Hi,
today I tried to create a minimal .NET core web API application which returns a result as a foundation for a micro-service approach...
Here the code that works (pasted into main):
WebHost.CreateDefaultBuilder(args)
.Configure(app =>
{
app.Run(async context =>
{
using (StreamWriter writer = new StreamWriter(context.Response.Body))
{
await writer.WriteAsync(await Task.FromResult("this works..."));
}
});
})
.Build()
.Run();
today I tried to create a minimal .NET core web API application which returns a result as a foundation for a micro-service approach...
Here the code that works (pasted into main):
WebHost.CreateDefaultBuilder(args)
.Configure(app =>
{
app.Run(async context =>
{
using (StreamWriter writer = new StreamWriter(context.Response.Body))
{
await writer.WriteAsync(await Task.FromResult("this works..."));
}
});
})
.Build()
.Run();
No comments:
Post a Comment