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?
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?
You can specify the [HttpGet()]
, [HttpPost()]
, [HttpPut()]
to restrict the method to one or more supported Http method,