あなたはCakeRequestオブジェクトの機能をカスタマイズすることができます方法は次のとおりです。
アプリ/コンフィグ/ bootstrap.phpのに次を挿入します。
/**
* Enable customization of the request object. Ideas include:
* * Accepting data in formats other than x-www-form-urlencoded.
*/
require APP . 'Lib' . DS . 'Network' . DS . 'AppCakeRequest.php';
アプリ/ libに/ネットワークを作成し、AppCakeRequest.phpを追加します。
<?php
/**
* AppCakeRequest
*
* Allows for custom handling of requests made to the application.
*/
class AppCakeRequest extends CakeRequest {
// Do your magic, and be careful...
}
編集アプリ/ウェブルート/ index.phpの:
$Dispatcher->dispatch(new AppCakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
あなたがしていることと幸運を知っていることを確認してください。