Thursday, January 5, 2012

HTTP Delete

We needed a api from our server team to remove a few resources in one shot. The server guy implemented a http DELETE rest api, and to support multiple resource removal in one shot, he decided to take the resource ids in the payload.

But one thing he missed, http protocol does not specify that there can be payload in the delete method. (and it's no more a REST api if it contains payload in delete, right?)

Looks like some http implementations in fact allows payload and that's why in his test, there was no problem.

But when I tried to request that from Android, voila... exception telling DELETE cannot write.


No comments:

Post a Comment