Last active
April 25, 2017 20:50
-
-
Save arturmkrtchyan/c1a2f91d19a349c05ee02c09242bc8f8 to your computer and use it in GitHub Desktop.
Java9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jdk.incubator.http.*; | |
HttpClient client = HttpClient.newHttpClient(); | |
HttpRequest request = HttpRequest.newBuilder(URI.create("http://www.google.com")).GET().build(); | |
HttpResponse response = client.send(request, HttpResponse.BodyHandler.asString()) | |
System.out.println(response.body()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment