Saturday, May 5, 2018

minimal .NET core web api


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):

                .Configure(app =>
                    app.Run(async context =>
                        using (StreamWriter writer = new StreamWriter(context.Response.Body))
                            await writer.WriteAsync(await Task.FromResult("this works..."));

No comments: