Pass handler to http function on modules