new http client code structure