开发者

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:

404 error when posting form data in cakephp

.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜