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,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With