7.4.7 Mapping to HTTP methods - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.0.11
7.4.7 Mapping to HTTP methods
URL mappings can also be configured to map based on the HTTP method (GET, POST, PUT or DELETE). This is very useful for RESTful APIs and for restricting mappings based on HTTP method.As an example the following mappings provide a RESTful API URL mappings for theProductController
:static mappings = { "/product/$id"(controller:"product", action: "update", method: "PUT") }