HttpMethodActionConstraint Class

Definition

The implementation of IActionConstraint used to enforce HTTP method filtering when MVC is used with legacy IRouter support. The HttpMethodActionConstraint can be used to determine the set of HTTP methods supported by an action.

C#
public class HttpMethodActionConstraint : Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint
Inheritance
HttpMethodActionConstraint
Implements

Constructors

Fields

Properties

HttpMethods

Gets the list of allowed HTTP methods. Will return an empty list if all HTTP methods are allowed.

Order

The constraint order.

Methods

Accept(ActionConstraintContext)

Determines whether an action is a valid candidate for selection.

Applies to

Proizvod Verzije
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0