Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@corespider
Created May 31, 2020 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corespider/e37d6152a5e608e8ad03c6e4ac0c8fae to your computer and use it in GitHub Desktop.
Save corespider/e37d6152a5e608e8ad03c6e4ac0c8fae to your computer and use it in GitHub Desktop.
CoreSpider- Middleware
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.Use(async (context, next) =>
{
await context.Response.WriteAsync("Hello World check from Use method!");
await next();
});
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World check from Run method!");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment