Skip to Content
Building RESTful Web Services with .NET Core
book

Building RESTful Web Services with .NET Core

by Gaurav Aroraa, Tadit Dash
May 2018
Intermediate to advanced
334 pages
7h 25m
English
Packt Publishing
Content preview from Building RESTful Web Services with .NET Core

Run

The Run method adds a delegate to the request pipeline in the same way as the Use method, but this method terminates the request pipeline. Look at the following screenshot for the signature of this method:

Look at the following code:

public void Configure(IApplicationBuilder app, ILoggerFactory logger){  logger.AddConsole();  //add more stuff that does not responses client  async Task RequestDelegate(HttpContext context)  {    await context.Response.WriteAsync("This ends the request or     short circuits request.");  }  app.Run(RequestDelegate);}

In the preceding code, I tried to show that Run terminates the request pipeline. Here, I used a local ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RESTful Web Services with ASP.NET Core 3

Hands-On RESTful Web Services with ASP.NET Core 3

Samuele Resca
Microservices in .NET Core

Microservices in .NET Core

Christian Horsdal Gammelgaard

Publisher Resources

ISBN: 9781788291576Supplemental Content