Added HttpClient interface to support both Android and server-side usage.