#1220 new

ajax.request to support more http method verbs (put, delete, ...)

Reported by retep | February 25th, 2011 @ 04:15 AM

prototype currently supports get and post verbs in ajax.request. for other methods it does a horrible hack where it adds a _method= param.

Prototype can be a useful tool for implementing REST-ful clients in a user's browser. For wiring up a web page to a server side restful interface.

Restful interfaces can often use verbs other than get and post. e.g. they can use delete and put. quite commonly.

Standard restful interfaces will not often be changeable by the end user (the prototype user). e.g. telling twitter or google to add support for a _method= param in their api instead of requiring a PUT likely will not be successful.

I've made some minor changes to prototype, diff attached, so that it supports the standard verbs (get post put delete head) (trace?) And added support for bodies on puts (as well as posts)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket