Skip to main content

Web: REST Verbs

I find it curious that REST enthusiasts insist on viewing the world through the five verbs GET, HEAD, PUT, POST, and DELETE. It reminds me of a story:

Back in the early '80s, I worked for DARPA. During the height of the Cold War, we were really worried about being attacked by Russia. My team was charged with designing a RESTful interface to a nuclear launch site; as far as technology goes, we were way ahead of our time.

Anyway, I wanted the interface to be "PUT /bomb". However, my co-worker insisted that it should be "DELETE /russia". One of my other buddies suggested that we compromise on something more mainstream like "POST /russia/bomb".

Finally, my boss put an end to the whole fiasco. He argued that any strike against the USSR would necessarily be in retaliation to an attack from them. Hence, he suggested that it be "GET /even", so that's what we went with.

You have to understand, back then, GETs with side effects weren't yet considered harmful.

Comments

Brandon L. Golm said…
Thank you for contracting 1980s correctly.
tonemcd said…
Excellent - morbid, but excellent! ;)
Kevin Dangoor said…
I think that REST would be much better if it had adverbs.

GET /secret_info QUIETLY

(retrieve the URL without logging)

DELETE / FORCEFULLY

(remove everything recursively -- no undo!)

I just don't see how people can view REST as a complete, useful protocol.

:)
christian said…
"I think that REST would be much better if it had adverbs."

This made me laugh. :-)
Haha, Kevin, exactly. In between the awful bloat of SOAP and the strangely religious advocates of REST, the rest of us are just trying to get our jobs done.
wcyee said…
That's funny, but FWIW, I think you miss the point entirely. You can be RESTful just sticking to GET/POST which is what most of the web does. The question is why your design chooses to reject PUT/DELETE when they might be appropriate. You may very well have good reason, but I don't know because you don't say. I don't think I can do a better job than this blog post:

http://www.25hoursaday.com/weblog/2008/08/17/ExplainingRESTToDamienKatz.aspx

Beyond that, *shrug*. 90% of these REST/WS-* debates seem to consist of uninformed participants on both sides, all pretending otherwise. Just like politics.
> That's funny, but FWIW, I think you miss the point entirely.

Perhaps I wasn't clear enough. I was railing against how religious the book "Restful Web Services" is. You say, "You can be RESTful just sticking to GET/POST which is what most of the web does", but the book seems to reject that stance, at least for as far as I've read it.
> http://www.25hoursaday.com/weblog/2008/08/17/ExplainingRESTToDamienKatz.aspx

Thanks for the link. I was aware of 90% of that content when I wrote the post, which is to say, my joke stands ;)
Venkatraman.S said…
el-oh-el! This is hilarious.