Hi there, I am pretty new to qooxdoo and I have a question regarding posting JSON data via the Json Store usng the IStroreDelegate to setup the request.
Using the following code I can successfully post the JSON data to the server and receive a JSON reponse. var url = "http://localhost:8080/court/spring/giveAndGetJson"; var delegate = { configureRequest : function(request) { request.setMethod("POST"); request.setRequestHeader("Content-Type", "application/json"); //request.setRequestData({ "username" : "person", "password" : "stuff" }); request.setRequestData("{ \"username\" : \"person\", \"password\" : \"stuff\" }"); } }; var store = new qx.data.store.Json(url, delegate); store.bind("model", self, "stuff2"); Here is what was posted (from firebug). JSON password "stuff" username "person" Source { "username" : "person", "password" : "stuff" } Here is the response (from firebug). {"username":"Changed the name","password":"Changed the password"} This all look good.....However, if I replace the argument to setRequestData with the object, instead of the JSON string - I get a 400 Bad Request error. Looking at what was posted I can see why (from firebug). Source username=person&password=stuff According to the documentation I should be able to set a map, qooxdoo object or string in setRequestData. Is this a bug or am I missing something. Many thanks, Paul ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
