-
-
Save oliversuarez/156fe8412bcc0b7278f8cb98de57d34e to your computer and use it in GitHub Desktop.
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
// HTTP Client GET | |
// Usage: jshell --add-modules jdk.incubator.httpclient http-get.jsh | |
import jdk.incubator.http.* | |
var client = HttpClient.newHttpClient() | |
var request = HttpRequest.newBuilder().uri(new URI("https://medium.com/adambgoode")).build() | |
var response = client.send(request, HttpResponse.BodyHandler.asString()) | |
System.out.println(response.body()) | |
/exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment