handle method setHttpRequest and setUrlGenerator