On Mon, Nov 22, 2010 at 12:53 PM, Tomas Doran <bobtf...@bobtfish.net> wrote: > > On 22 Nov 2010, at 17:44, Ronald J Kimball wrote: >> >> This works for JSON requests (e.g. application/json), but not for >> JSONP requests (e.g. text/javascript), because there is no >> Catalyst::Action::Deserialize::JSONP. I guess I could create one that >> extends Catalyst::Action::Deserialize::JSON... > > Yes, that's a more correct solution. > http://cpansearch.perl.org/src/BOBTFISH/Catalyst-Action-REST-0.87/lib/Catalyst/Action/Deserialize/JSON.pm > Catalyst::Action::Deserialize::JSON reads out of the body (but it doesn't > care what the request method is - you can PUT instead of POST for example). > So do that, and you have no more issues?
It doesn't care what the request method is, as long as it's POST, PUT, OPTIONS, or DELETE. ;) If I create Catalyst::Action::Deserialize::JSONP, I'll still need to convert the GET request to a POST. That seems to be the really tricky part. Ronald _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/