a boilerplate for http handler