diff --git a/classlib/src/main/java/org/teavm/classlib/java/net/THttpURLConnection.java b/classlib/src/main/java/org/teavm/classlib/java/net/THttpURLConnection.java index d5edde45f..84874b7fc 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/net/THttpURLConnection.java +++ b/classlib/src/main/java/org/teavm/classlib/java/net/THttpURLConnection.java @@ -87,12 +87,12 @@ public abstract class THttpURLConnection extends TURLConnection { } public int getResponseCode() throws IOException { - getInputStream(); + connect(); return responseCode; } public String getResponseMessage() throws IOException { - getInputStream(); + connect(); return responseMessage; }