C#C
C#3y ago
11 replies
palapapa

✅ Why is the trailing dot of a route template optional?

Here https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-7.0#route-templates it mentions that "If only a value for filename exists in the URL, the route matches because the trailing . is optional." But just before that it says "Literal text other than route parameters (for example, {id}) and the path separator / must match the text in the URL. "
Discover how ASP.NET Core routing is responsible for matching HTTP requests and dispatching to executable endpoints.
Routing in ASP.NET Core
Was this page helpful?