improved CustomResourcesHandler to handle all common HTTP requests