This is not how you create a new variable in Java. Statements declaring the class name do not start with var (that is JavaScript), you should use this:
HttpClient client = HttpClient.newHttpClient();
Also, if you are getting requests, you should use this code because it works asynchronously. (coutesy @Kumar)