[Catalyst] deserializing key value pairs Catalyst::Controller::REST

Jochen Luig skirnir at gmx.net
Fri Jul 25 09:48:22 BST 2008

Hi Hani,

> var postData = "source_account=1&destination_account=2&ingestor_id=10&source_id=1"
I think this is where it fails. As far as I can tell from your code,
postData should contain a JSON Object.
Try something like:

var postData = '{ "source_account": "1", "destination_account": "2",
"ingestor_id": "10", "source_id": "1" }';

On another note, make sure that YAHOO.util.Connect.asyncRequest doesn't
mess up your request somehow (is that YUI, btw?). I've just experienced
the same annoyance with Dojo, whose dojo.xhrPost is not exactly fond of
sending JSON-Objects. It helps to look at the request itself with some
tool like e.g. wireshark.



More information about the Catalyst mailing list