Custom appendQueryParameters support
andrejpavlovic opened this issue · comments
Would it be possible to add support for a custom appendQueryParameters function that could be specified when instantiating easyXDM.
e.g.
accountCommunicator = new easyXDM.Rpc({
remote: "http://some/url/",
appendQueryParameters: function(url, parameters, useHash, appendQueryParameters) {
// return custom url
return url;
}
});
Basically I want to be able to custom build a url like so:
http://test.com/?redirect=http%3A%2F%2Ftest.com%2Fsave.html%3Fxdm_e%3Dhttp%253A%252F%252Forigin.test.com%26xdm_c%3Ddefault5740%26xdm_p%3D1
instead of the way it is build automatically:
http://test.com/?redirect=http%3A%2F%2Ftest.com%2Fsave.html&xdm_e=http%3A%2F%2Forigin.test.com&xdm_c=default5740&xdm_p=1
Why would you want to do this in appendQueryParameters
? I'm guessing that what you really want is to run the finished url through a transformation (replacing it with a new url with the original url added as a urlencoded argument)?
If that is the case, feel free to make such an extension and if it looks like something that is useful (it might just), then I'll pull it in :)