Fixed encoding at http-request

This commit is contained in:
Marc Beyer 2022-01-29 11:44:25 +01:00
parent 780ecbee0f
commit 72fdce471b

View File

@ -61,9 +61,9 @@ public class HttpRequest {
BufferedReader in; BufferedReader in;
if (status == 200) { if (status == 200) {
in = new BufferedReader(new InputStreamReader(connection.getInputStream())); in = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8));
} else { } else {
in = new BufferedReader(new InputStreamReader(connection.getErrorStream())); in = new BufferedReader(new InputStreamReader(connection.getErrorStream(), StandardCharsets.UTF_8));
} }
while ((inputLine = in.readLine()) != null) { while ((inputLine = in.readLine()) != null) {