[http] sendReader
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Johannes Frohnmeyer 2022-11-01 19:30:33 +01:00
parent 0c7a000c2f
commit ecf1037b2e
Signed by: Johannes
GPG Key ID: E76429612C2929F4

View File

@ -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();
}
}