On 03.03.2015 14:58, Frédéric wrote: > Le 03/03/2015, Daniel a écrit : > >> I can't test it right now, but configureRequest should do it: >> >> res.configureRequest(function(req, action, params, data) { >> req.setRequestData("foo=bar"); >> }); > > I made some tests, and I see 2 problems: > > - params are not passed as REST url. For example, I have a REST resource > pointing to /eib/new, and I want to add my ts as /eib/new/<ts>. If I use > the setRequestData(), I get something like /eib/new/?ts=xxx...
I'm not really a REST expert, but isn't that something you'd configure in your resource description? Something like var description = { "put": { method: "PUT", url: "/eib/new/{ts}"}, }; resource.put({ts: something}, data); > > - I can't give a private param of the class owning the REST resource (this > is not defined in the function). > Use Function.bind: res.configureRequest(function(req, action, params, data) { req.setRequestData(this.__private); }.bind(this)); ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel