Suresh Kumar
How we can restrict access to methods with specific HTTP verbs in Web API?
By Suresh Kumar in ASP.NET on Nov 22 2017
  • Suresh Kumar
    Nov, 2017 22

    Attribute programming is used for this functionality. Web API will support to restrict access of calling methods with specific HTTP verbs. We can define HTTP verbs as attribute over method as shown below[HttpPost]public void UpdateTestCustomer(Customer c){TestCustomerRepository.AddCustomer(c); }

    • 0