I have a lithium app and I try to return json response when the header request has Accept:application/json
(I would like to avoid using the type parameter in my route)
I add this instruction in my app/bootstrap/media.php but I still have a html response
Media::type('json', array('application/json'), array(
'conditions' => array('type' => true)
));
What did I miss ?
I saw a similar question but it seams that the framework evolved : PHP lithium(li3) how to set up automatic response with JSON