404 error when posting form data in cakephp
I have a RESTful api in a cakephp app that returns json data. I am testing it with firefox REST Client. The GET requests work fine, but I am getting 404 errors I dont understand when posting form data. The failing requests look like this:
.If I change the content-type to "text/html" I don't get a 404 anymore, although I do not get the expected response, presumably because the form data is not being posted.
Any ideas wha开发者_如何转开发t's going on?
I figured out the problem. The cakephp security component needed the csrf token. Setting "validatePost" to false on that compoment fixed the issue.
精彩评论