You need to set the JSON content-type manually.
On Oct 29, 11:01 am, Zac Tolley <[email protected]> wrote:
> I'm using an ajax library on the client side of my application to
> issue calls for json data from the cakephp server.
>
> In the request that is made to the controller the following header is
> included:
>
> X-Requested-With : XMLHttpRequest
>
> As I understand it this should be recognised by cake so that the
> response includes a header to flag that this is json content. The
> response, however, has the content type set to 'text/html'.
>
> Am I missing something or do I need to do something in cake to make it
> recodnise this as a json request and return the correct header?
>
> I
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---