diff --git a/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java b/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java index 6cc1567..bf304d1 100644 --- a/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java +++ b/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java @@ -170,6 +170,10 @@ public class HttpUtils { return _send("*/*", HttpResponse.BodyHandlers.ofInputStream()); } + public Reader sendReader() throws IOException { + return new InputStreamReader(sendInputStream()); + } + public String sendString() throws IOException { return _send("*/*", HttpResponse.BodyHandlers.ofString()); } @@ -215,8 +219,4 @@ public class HttpUtils { public static Request delete(String url) throws URISyntaxException { return new Request(Method.DELETE, url); } - - public static void main(String[] args) throws URISyntaxException, IOException { - get("https://frohnmeyer-wds.de/doesnt_exxist").send(); - } }