Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would Twitter have deprecated the use of DELETE as a request method in their API?

Twitter has deprecated the use of all methods that use DELETE as a request method,

DELETE :user/lists/:id  

And now instead uses POST as the request method,

POST lists/destroy

Why has Twitter have stopped using DELETE in their API altogether, and now only use POST and GET for all methods?

  • Is it performance?
  • Is it security?
  • What are the advantages of building an API that only uses POST and GET?
like image 935
James Beith Avatar asked Jan 12 '12 19:01

James Beith


1 Answers

I think there were compatibility issues with some clients being able to issue DELETE requests. Looking back at the docs for one of the deprecated calls, I found this blurb.

Usage Note: clients who can not issue DELETE requests can POST with the added parameter _method=DELETE

So, my feeling (and guess) is that since the DELETE verb wasn't uniformly supported, it was removed system-wide.


Update: I sent a tweet to Taylor (@episod) at Twitter and asked what he thought about the above, and he sent the following responses:

@arcain [the answer] pretty much covers it; no disrespect intended to idyllic REST. DELETE still usually works on those methods, but we omit from docs. [link]

@arcain though most of the methods mentioned there weren't deprecated because of the HTTP method so much as because of clumsy URL patterns. [link]

So, usability -- along with compatibility -- seem to have been the key concerns with the deprecations.

like image 173
arcain Avatar answered Oct 12 '22 23:10

arcain