Created
May 31, 2020 08:02
-
-
Save corespider/209adbc519f243caded9a8f5f93d24bf to your computer and use it in GitHub Desktop.
CoreSpider- Middleware
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
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.Run(Mymiddleware); | |
app.Run(async (context) => | |
{ | |
await context.Response.WriteAsync("Hello World!"); | |
}); | |
} | |
private Task Mymiddleware(HttpContext context) { | |
return context.Response.WriteAsync("Hello World from CoreProgram"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment