From ecf1037b2eccdb5027432c2ff6550807dc27c4d9 Mon Sep 17 00:00:00 2001 From: JFronny Date: Tue, 1 Nov 2022 19:30:33 +0100 Subject: [PATCH] [http] sendReader --- src/main/java/io/gitlab/jfronny/commons/HttpUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); - } }