views:

70

answers:

2

We were having a discussion internally here at work about jQuery having built-in support for $.get() and $.post(), but not for $.put() and $.delete().

Some think that its to keep the js library size smaller. Others think that its not a feature that is often asked for, so is left to plugin developers to make.

What are some thoughts from the SO community?

+2  A: 

I hate to pull a percentage out of my ass but I think 90-95% of front end devs will never need to use $.delete or $.put.

meder
+1 though I think you're overestimating how many people would use them!
lonesomeday
They become quite a bit more useful (and more common) when you're dealing with RESTful services, where `PUT` and `DELETE` have semantics and could be used to add or delete entries in a collection.
cHao
+5  A: 

Where do you stop? $.options()? $.copy()? $.mkactivity()?

There are too many potential HTTP verbs to bother to create a convenience method for each. Webapps haven't bothered too much with PUT and DELETE in the past, so they're not used that often. The gain from a convenience method is pretty small; there's not really any problem with just using $.ajax().

bobince
"There are too many potential HTTP verbs to bother to create a convenience method for each." I can't imagine this thinking has ever been applied to anything concerning jquery.
lincolnk