added possibility to use different handler for different http url endpoints