On Nov 7, 9:08 am, "jaap.taal" <[EMAIL PROTECTED]> wrote: > I'd like a toString method for an Ajax.Request object that can > identify the request for logging purposes. Right now I'm using the > following custom code: > > Ajax.Request.prototype.toString = function() { > if (this.method == 'get') {
And what if it's "PUT" or "DELETE"? > return this.url + "(GET)"; > } else { > return this.url + "?" + $H(this.parameters).toQueryString() + > "(POST)"; > } > > }; > > I think something like this ought to be in the prototype library. I don't remember anyone proposing such thing : ) You can create a ticket (marking it as an enhancement) but I'm afraid what the output of `toString` should be is a pretty subjective decision. I think it's easy enough to write one (as you did) and "tailor" it to your specific need. -- kangax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---