0
我打算從我的android應用程序發送一個postphp請求給fuelphp控制器。但控制器不接受發佈請求。有沒有辦法讓控制器接受我的應用程序發佈的請求?如何讓應用程序在fuelphp中發佈POST請求
感謝
我打算從我的android應用程序發送一個postphp請求給fuelphp控制器。但控制器不接受發佈請求。有沒有辦法讓控制器接受我的應用程序發佈的請求?如何讓應用程序在fuelphp中發佈POST請求
感謝
首先查看關於CSRF的燃料配置
'csrf_autoload_methods' => array('post', 'put', 'delete'),
那麼你應該使用restcontroller
class Controller_Test extends Controller_Rest
{
public function get_list()
{
return $this->response(array(
'foo' => Input::get('foo'),
'baz' => array(
1, 50, 219
),
'empty' => null
));
}
}