Bruce McKenzie wrote:
> This question would actually sort of fit into the Ajax thread which is
> under the subject "Test 2 - is this thing on" :-)
>
> Anyway, should I be changing the header type when returning JSON or
> something other than HTML from CAP?
If you used CAP::JSON (another plug) you wouldn't have to worry about this:
return $self->json_body({ foo => 'stuff', bar => [0,1,2,3]} );
But yes you do need to change it. I usually use "text/x-json", but there are a
couple of derivatives that will work as well.
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]