Am Sonntag, 28. Mai 2006 17:48 schrieb John Wang:
> X-JSON is the name of the custom header, not a content-type so
> header("Content-Type: X-JSON") won't work. You need the X-JSON header set
> to the JSON string. In PHP, do the following:
>
> header("X-JSON: $json");
>
> I use Catalyst with the following. It's pretty similar to the PHP code so I
> expect that to work for you.
>
> $c->res->headers->header( 'X-JSON' => $json );
>
> On a side note. Is X-JSON a standard or just for prototype? The JSON
> response can be pretty large. Is stuffing a header a good implementation?
Thanks guys, the custom header approach works.
I've used the PHP script with Dojo before. As far as i remember they also
supported the application/x-json content type, that kinda confused me.
Best Regards,
Dirk Eschler
--
Dirk Eschler <mailto:[EMAIL PROTECTED]>
http://www.krusader.org
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs