Comment 2 for bug 939535

Revision history for this message
Bill Erickson (berick) wrote :

I think previously this kind of thing was handled by tacking ad-hoc fields onto the request object. E.g. req._mystuff = foo; I like the idea of formalizing it, though. One comment on the code... I could be wrong, I haven't tested this, but wouldn't it be enough to capture the callbackdata in the OpenSRF.Request constructor (like you have), but without passing it around to the other layers? Inside the caller's oncomplete() handler, they can acces the callback data like => oncomplete : function(req) { var cbd = req.callbackdata; ... }