Share via


HttpMethodConstraint Constructor

Initializes a new instance of the HttpMethodConstraint class by using the HTTP verbs that are allowed for the route.

Namespace:  System.Web.Http.Routing
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public Sub New ( _
    ParamArray allowedMethods As HttpMethod() _
)
'Usage
Dim allowedMethods As HttpMethod()

Dim instance As New HttpMethodConstraint(allowedMethods)
public HttpMethodConstraint(
    params HttpMethod[] allowedMethods
)
public:
HttpMethodConstraint(
    ... array<HttpMethod^>^ allowedMethods
)
new : 
        allowedMethods:HttpMethod[] -> HttpMethodConstraint
public function HttpMethodConstraint(
    ... allowedMethods : HttpMethod[]
)

Parameters

  • allowedMethods
    Type: HttpMethod[]
    The HTTP verbs that are valid for the route.

See Also

Reference

HttpMethodConstraint Class

System.Web.Http.Routing Namespace