Saturday, April 10, 2010
At rare times when I can't find Erlang code for things that have long been available in other languages, my pride of being Erlang programmer takes it very personally. One of these times came recently, when I had to call a web service protected by digest authentication from my code. Couldn't find it anywhere, but I probably spent more time trying to google the solution than I did writing the code, which is available here. Be forewarned that it was tested only with one particular web service, and by no means it tries to implement full spec. It was basically written by reading Wikipedia. hex/1 function was ripped from ejabberd code base that implements digest check on server side. Enjoy!