Abstracted the http handler

A bit clearer for those who would like to use something other than
martini