mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-01 22:14:01 +03:00
Update IOHelper.java
This commit is contained in:
parent
4013a2d542
commit
cf7c524a9d
1 changed files with 2 additions and 0 deletions
|
@ -223,6 +223,7 @@ public static URLConnection newConnection(URL url) throws IOException {
|
|||
connection.setReadTimeout(HTTP_TIMEOUT);
|
||||
connection.setConnectTimeout(HTTP_TIMEOUT);
|
||||
connection.addRequestProperty("User-Agent", USER_AGENT); // Fix for stupid servers
|
||||
connection.setConnectTimeout(10000);
|
||||
} else
|
||||
connection.setUseCaches(false);
|
||||
connection.setDoInput(true);
|
||||
|
@ -235,6 +236,7 @@ public static HttpURLConnection newConnectionPost(URL url) throws IOException {
|
|||
connection.setDoOutput(true);
|
||||
connection.setRequestMethod("POST");
|
||||
connection.addRequestProperty("User-Agent", IOHelper.USER_AGENT);
|
||||
connection.setConnectTimeout(10000);
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue