I am trying to map a JSON api to my controller like:
/api/user/1/location GET --> Controller.getLocation()
/api/user/1/location POST --> Controller.setLocation()
I have tried the following url mapping rule without any luck:
"/api/$controller/$id/$property" {
action = {[GET: "get${params.property.capitalize()}", POST: "set${params.property.capitalize()}"]}
}
Anyone tried something like this