HttpMethodConstraint Class
Enables you to define which HTTP verbs are allowed when ASP.NET routing determines whether a URL matches a route.
Namespace: System.Web.Http.Routing
Assembly: System.Web.Http (in System.Web.Http.dll)
Inheritance Hierarchy
System.Object
System.Web.Http.Routing.HttpMethodConstraint
Syntax
public class HttpMethodConstraint : IHttpRouteConstraint
public ref class HttpMethodConstraint : IHttpRouteConstraint
type HttpMethodConstraint =
class
interface IHttpRouteConstraint
end
Public Class HttpMethodConstraint
Implements IHttpRouteConstraint
Constructors
Name | Description | |
---|---|---|
HttpMethodConstraint(HttpMethod[]) | Initializes a new instance of the HttpMethodConstraint class by using the HTTP verbs that are allowed for the route. |
Properties
Name | Description | |
---|---|---|
AllowedMethods | Gets or sets the collection of allowed HTTP verbs for the route. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
Match(HttpRequestMessage, IHttpRoute, String, IDictionary<String, Object>, HttpRouteDirection) | 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.) |
Explicit Interface Implementations
Name | Description | |
---|---|---|
IHttpRouteConstraint.Match(HttpRequestMessage, IHttpRoute, String, IDictionary<String, Object>, HttpRouteDirection) | Determines whether the request was made with an HTTP verb that is one of the allowed verbs for the route. |
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.
See Also
System.Web.Http.Routing Namespace
Return to top