|
|
@ -11,12 +11,14 @@ public class SourceListener { |
|
|
|
HttpClient client = HttpClient.newHttpClient(); |
|
|
|
HttpClient client = HttpClient.newHttpClient(); |
|
|
|
HttpRequest request = HttpRequest.newBuilder() |
|
|
|
HttpRequest request = HttpRequest.newBuilder() |
|
|
|
.uri(URI.create("http://molokoin.ru:3000/esoe/molokoin-client")) |
|
|
|
.uri(URI.create("http://molokoin.ru:3000/esoe/molokoin-client")) |
|
|
|
|
|
|
|
//.uri(URI.create("http://molokoin.ru:3000/esoe/molokoin-client/archive/master.zip"))
|
|
|
|
.GET() // GET is default
|
|
|
|
.GET() // GET is default
|
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
HttpResponse<String> response = client.send(request, |
|
|
|
HttpResponse<String> response = client.send(request, |
|
|
|
HttpResponse.BodyHandlers.ofString()); |
|
|
|
HttpResponse.BodyHandlers.ofString()); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println(response.statusCode()); |
|
|
|
System.out.println(response.statusCode()); |
|
|
|
System.out.println(response.headers()); |
|
|
|
System.out.println(response.headers()); |
|
|
|
System.out.println(response.body()); |
|
|
|
System.out.println(response.body()); |
|
|
|