API

Map (path branch)

Branches the middleware pipeline using a path prefix.

Formal Syntax & Structure

csharp syntaxcsharp
app.Map("/lab", branch => branch.Run(ctx => ctx.Response.WriteAsync("lab")));

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context.app.Map("/lab", branch => branch.Run(ctx => ctx.Response.WriteAsync("lab")));
C# & .NET Reference