Replacing TCPClient with HttpClient