I\'m trying to set the content-type header for a JSON response accessed with an AJAX GET request. I\'ve followed tutorials on blogs and the bakery but I always receive \'text/ht
After reading this and this, I got the following to return "Content-Type:application/json":
Configure::write('debug', 0);
$this->RequestHandler->respondAs('json');
$this->autoRender = false;
echo json_encode($data);
With JQuery's $.getJSON method, I'm still getting
Resource interpreted as image but transferred with MIME type text/html.
But at least my data is parsing.