prototypejs / prototype

Prototype JavaScript framework
http://prototypejs.org/
Other
3.54k stars 639 forks source link

Support for other Request Methods than `get` and `post` #287

Closed bylexus closed 9 years ago

bylexus commented 9 years ago

Added a simple possibility to support other HTTP methods, without breaking the default:

One can just set the static Ajax.Request.supportedHTTPMethods array. Example:

Ajax.Request.supportedHTTPMethods = ['get','post','put','delete'];
new Ajax.Request('/backend/url', {method: 'delete'});

If you find this useful, it would be great. It would really improve the library usage for our own projects.

savetheclocktower commented 9 years ago

I'm going to solve this somehow, just haven't decided how yet. This will be one of the things I consider. We're tracking this enhancement in #280. Thanks!