How can I overload ASP.NET MVC Actions based on the accepted HTTP verbs?

Viewed 6578

Wanted to use the same URL for a GET/PUT/DELETE/POST for a REST based API, but when the only thing different about the Actions is which HTTP verbs it accepts, it considers them to be duplicate!

"Type already defines a member called 'Index' with the same parameter types."

To which I said, so what? This one only accepts GET, this one only accepts POST... should be able to be co-exist right?

How?

4 Answers
Related