The goodness of curl (and REST)

Tim Bray, in an post about testing atom protocol, said

We got two different clients to talk to it; one was a Big Secret Project from a Big Famous Company based on all sorts of slick infrastructure. Mine was curl. […] Those who know what curl is are probably snickering now. But I think the fact that you can debug a nontrivial application with curl -X -i -d -H is a significant weapon in the quiver of RESTafarians.

We are only snickering because we have done the same thing. When you are testing a RESTful application a big sophisticated client mostly just complicates things.

There is a huge advantage to technologies that can be worked with using existing, generalized and scriptable tools. That ability allows for easy testing and debugging, as Mr. Bray points out, but the advantages do not end once you are done debugging.

These days most people are employed to deal with abnormal situation. The normal situations are mostly automated and require very little human intervention. Having software that can be worked with and monitored by existing, scriptable, tools means the you have to write less code to handle those abnormal situations when they arise. If you are a RESTafarian, you just grab curl and a few minutes later you are done. Even better, if that abnormal situation is common enough to warrant it, you can even wrap it up in a script so that anyone can handle it.