simulate the http request and define