RequestDelegateRouteBuilderExtensions.MapMiddlewareVerb Method

Definition

Adds a route to the IRouteBuilder that only matches HTTP requests for the given verb, template, and action.

C#
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewareVerb (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> action);

Parameters

verb
String

The HTTP verb allowed by the route.

template
String

The route template.

action
Action<IApplicationBuilder>

The action to apply to the IApplicationBuilder.

Returns

A reference to the builder after this operation has completed.

Applies to

Tuote Versiot
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0