add interface to http request. add test