httpclient implementation to support running on GAE