HttpMethodConstraint Class
Enables you to define which HTTP verbs are allowed when ASP.NET routing determines whether a URL matches a route.
Inheritance Hierarchy
System.Object
System.Web.Http.Routing.HttpMethodConstraint
Namespace: System.Web.Http.Routing
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Class HttpMethodConstraint _
Implements IHttpRouteConstraint
'Usage
Dim instance As HttpMethodConstraint
public class HttpMethodConstraint : IHttpRouteConstraint
public ref class HttpMethodConstraint : IHttpRouteConstraint
type HttpMethodConstraint =
class
interface IHttpRouteConstraint
end
public class HttpMethodConstraint implements IHttpRouteConstraint
The HttpMethodConstraint type exposes the following members.
Constructors
Name | Description | |
---|---|---|
HttpMethodConstraint | Initializes a new instance of the HttpMethodConstraint class by using the HTTP verbs that are allowed for the route. |
Top
Properties
Name | Description | |
---|---|---|
AllowedMethods | Gets or sets the collection of allowed HTTP verbs for the route. |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Match | Determines whether the request was made with an HTTP verb that is one of the allowed verbs for the route. | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IHttpRouteConstraint.Match | Determines whether the request was made with an HTTP verb that is one of the allowed verbs for the route. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.