[Catalyst] REST, JSON and Content-Type

J. Shirley jshirley at gmail.com
Mon Jun 16 20:49:23 BST 2008


On Mon, Jun 16, 2008 at 12:45 PM, Christopher H. Laco
<claco at chrislaco.com> wrote:
> So, I'm trolling through the ASP.NET 3.5 docs on JSON and AJAX and it talks
> about GET not being enabled by default for a web service and that the mime
> type must be application/json
>
> Of course the REST package has this:
>
>>            'text/x-json'        => 'JSON',
>
> Near as I can gather, the official type is appliction/json:
>
>> http://tech.groups.yahoo.com/group/json/message/337
>> http://www.iana.org/assignments/media-types/application/
>> http://www.ietf.org/rfc/rfc4627.txt
>
> And to make matters more fun, MIME::Types has neither.
>
> I know, I know. "Well volunteered". :-)
>
> Before I go patching things and submitting RT bugs, what do we want to do
> with REST?
>
> I vote to support both mime types. Near as I figure, it can't hurt to do so.
>
> Perhaps a warning about using an outdated mime type?
>
> -=Chris
>
>
>

I'm in hearty agreement -- and I use "application/json" in my apps these days.

-J



More information about the Catalyst mailing list