1.Startup.cs の修正
public void Configure
を、以下のように修正します
endpoints.MapGet("/", async context =>
{
// await context.Response.WriteAsync("Hello World!");
context.Response.ContentType = "text/html" ;
await context.Response.WriteAsync("<html><body><h1>hello!</h1></body></html>") ;
});
2.実行すると
h1で
hello!
が表示されます