If I create a webApi controller and populate it with methods prefixed with http-verbs, Api can correctly indicate which verb should be used on this controller.
public class TestController : ApiController { public string GetData() { return "Called Get Method"; } public string PostData() { return "Called Post Method"; } public string PutData() { return "Called Put Method"; } }
If you replace Post with Update , the Post method continues to work implicitly.
public string UpdateData() { return "Called Updated Method"; }
Is there a list of possible method prefixes and which verb they belong to? Also, is it possible to define custom prefixes? For example, if I wanted to always display a method starting with βSearchβ in Post , can I define this?
source share