Fix behaviour of HttpUrlConnection responseCode/responseMessage

This commit is contained in:
Alexey Andreev 2018-01-07 18:45:00 +03:00
parent 8e4b84545f
commit a9beef3a15

View File

@ -87,12 +87,12 @@ public abstract class THttpURLConnection extends TURLConnection {
} }
public int getResponseCode() throws IOException { public int getResponseCode() throws IOException {
getInputStream(); connect();
return responseCode; return responseCode;
} }
public String getResponseMessage() throws IOException { public String getResponseMessage() throws IOException {
getInputStream(); connect();
return responseMessage; return responseMessage;
} }