Ok! This question is directed to the cakePHP ninjas out there. I have just started using cakePHP in my projects after going through their documentation.
I have an action which I want the user to access only via POST request rather then a GET request. In the action I have the like :
If($this->request->is('get')){
throw new MethodNotAllowedException();
}
And this works... (it displays the relevant message) However, an error still occurs, telling me that the requested address is not found on the server.Now I understand why its happening, but I would like to know how I should tackle it within cake.. Any remarks appreciated !
---Edit--- Specific Question : How can I catch the error with cakePHP ? please help if you can, even if you feel that this is very trivial for you!