lunes, 1 de septiembre de 2008

Parche para que prototype permita ajax con methods PUT, DELETE, etc

"request" function of Ajax.Request class, simulate other verbs (e.g. DELETE, PUT, HEAD, etc) over post.

Why restrict to only get and post requests?

To enable prototype use servlets of my project (that requires DELETE and PUT methods), as a patch, I replaced in that function this line:


this.transport.open(this.method.toUpperCase(), this.url,
this.options.asynchronous);

by this:


this.transport.open(this.options.method.toUpperCase(), this.url,
this.options.asynchronous);

and works perfectly.

http://prototype.lighthouseapp.com/projects/8886/tickets/289-allow-put-delete-and-other-http-methods-on-ajax-requests

No hay comentarios: