Optimize http method dispatching