CakePHP ajax post keeps returning 400 Bad Request

前端 未结 4 594
北海茫月
北海茫月 2021-02-09 19:41

I am tring to use an ajax post to an action. GET requests work fine but when I try to POST I see a \'400 Bad Request\' in firebug and the view return a \'Black hole\' response.<

4条回答
  •  隐瞒了意图╮
    2021-02-09 20:05

    Make shure you are putting the function editUser in:

      public function beforeFilter(){
        parent::beforeFilter()
        $this->Auth->allow('editUser');
        }
    

    inside of UsersController,

    Regards

提交回复
热议问题