Reputation: 3568
With the AttributeRouting library I can restrict a route to a specific verb:
[Route("customers", HttpVerbs.Post)]
In MVC 5 AttributeRouting is built in, but there is no overload taking HttpVerbs. How do I restrict a route to POST in this case?
Upvotes: 5
Views: 794
Reputation: 5807
You can specify the [HttpGet()]
, [HttpPost()]
, [HttpPut()]
to restrict the method to one or more supported Http method,
Upvotes: 1