Let us get something clear - the X-JSON header is a hack. Nothing serious,
just a small hack which simplifies returning two types of data (HTML and
application/json) at the same time. Of course we're using HTTP headers in a
way we shouldn't, but has anyone seen how multipart-encoded message look
like? Our header hack is way nicer and technically simpler than that kind of
encoding.

The X-something headers are reserved for custom (proprietary) usage. We have
the freedom to use them in any way we want to, and we have taken that
liberty to do some highly conventional JSON magic.

For big loads of JSON data you'll want to use response body. The ticket I
submitted (and for which I'll provide a patch for) will enable that.

Ed C.: yeah, HTTP status messages could be extracted and shown in this case,
but X-JSON chunks are used for much more than that. I use them regularly to
return small hashes representing certain records or other objects.

--
Mislav

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to