On 05/05/2010 11:14 AM, [email protected] wrote: > Hi. > > The way qx.io.remote.Rpc is implemented now, you don't have access to the > request object (qx.io.remote.Request) it constructs in _callInternal. As > such, there is no way you can attach custom http headers, for instance, to > the request - which is just what I need now. > > We will get around this issue by inheriting from it and overriding > _callInternal, but this is not nice. > > There are two solutions to the problem, which IMO have their place in the > framework, rather than in client code. > > One is to add a specific mechanism to qx.io.remote.Request to allow > specification of custom headers. > > The other one, which seems nicer to me, is to extract the request creation in > a separate, protected factory method. Derived classes can then parametrize > the request as they see fit, by overriding the factory method. > > Why I think the second way of solving the problem is better: first (weaker > reason), the method _callInternal is quite long, which seems ugly to me, > second (stronger reason), by exposing the request creation you provide access > to whatever other features and preoperties of the request client programmers > may want to manipulate, instead of potentially having client programmers > derive qx.io.remote.Rpc just in order to access some other feature than the > http headers on the request, as we will do now. > > May I provide a patch?
Open an enhancement bug, include your arguments, and add the patch to the bug. T. ------------------------------------------------------------------------------ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
