decorates an http request handler