encapsulating http request in ClientRequest