AspNetCore.Docs/aspnetcore/fundamentals/minimal-apis/route-handlers.md

1.1 KiB

title author description ms.author monikerRange ms.date uid
Route handlers in Minimal API apps rick-anderson Learn how to handle requests in Minimal API apps. wpickett >= aspnetcore-7.0 10/31/2022 fundamentals/minimal-apis/route-handlers

Route Handlers in Minimal API apps

[!INCLUDE]

A configured WebApplication supports Map{Verb} and xref:Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapMethods%2A where {Verb} is a Pascal-cased HTTP method like Get, Post, Put or Delete:

[!code-csharp]

The xref:System.Delegate arguments passed to these methods are called "route handlers".

Route handlers

[!INCLUDE route handling]

Parameter binding

xref:fundamentals/minimal-apis/parameter-binding describes the rules in detail for how route handler parameters are populated.

Responses

xref:fundamentals/minimal-apis/responses describes in detail how values returned from route handlers are converted into responses.