Hi,
I would like to set custom http headers. I've been reading some posts
and in one of them Jitka says (http://groups.google.com/group/cake-php/
browse_thread/thread/3c5c74d233438c25/3a2068bddfc37cc5?
lnk=gst&q=layoutPath#3a2068bddfc37cc5):
"You can also call some RequestHandler methods in Your
AppController::beforeFilter() so RequestHandler can send any custom
header for any custom 'file extension' "
What would be the nice way to set an extra header for a json request?
At the moment im doing it at the layout like this...
<?php
header("Pragma: no-cache");
header("Cache-Control: no-store, no-cache, max-age=0, must-
revalidate");
header('Content-Type: text/x-json');
header("X-JSON: " . $content_for_layout);
?>
<?php echo $content_for_layout ?>
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---