move code from http client interface to response