RequestDelegateRouteBuilderExtensions.MapGet Method

Definition

Overloads

MapGet(IRouteBuilder, String, RequestDelegate)

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

MapGet(IRouteBuilder, String, Action<IApplicationBuilder>)

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

MapGet(IRouteBuilder, String, Func<HttpRequest,HttpResponse,RouteData,Task>)

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

MapGet(IRouteBuilder, String, RequestDelegate)

Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs

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

C#
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapGet (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Microsoft.AspNetCore.Http.RequestDelegate handler);

Parameters

template
String

The route template.

handler
RequestDelegate

The RequestDelegate route handler.

Returns

A reference to the builder after this operation has completed.

Applies to

ASP.NET Core 9.0 ja muut versiot
Tuote Versiot
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

MapGet(IRouteBuilder, String, Action<IApplicationBuilder>)

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

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

Parameters

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

ASP.NET Core 1.1 ja ASP.NET Core 1.0
Tuote Versiot
ASP.NET Core 1.0, 1.1

MapGet(IRouteBuilder, String, Func<HttpRequest,HttpResponse,RouteData,Task>)

Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs
Source:
RequestDelegateRouteBuilderExtensions.cs

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

C#
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapGet (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Func<Microsoft.AspNetCore.Http.HttpRequest,Microsoft.AspNetCore.Http.HttpResponse,Microsoft.AspNetCore.Routing.RouteData,System.Threading.Tasks.Task> handler);

Parameters

template
String

The route template.

handler
Func<HttpRequest,HttpResponse,RouteData,Task>

The route handler.

Returns

A reference to the builder after this operation has completed.

Applies to

ASP.NET Core 9.0 ja muut versiot
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