修复http连接问题
This commit is contained in:
parent
cb708d5e44
commit
c2098ec827
@ -30,8 +30,8 @@ public class HttpTools {
|
||||
|
||||
public static String https_get(String url, Map<String, String> header) {
|
||||
try {
|
||||
HttpsURLConnection connection;
|
||||
connection = (HttpsURLConnection) new URL(url).openConnection();
|
||||
URLConnection connection;
|
||||
connection = new URL(url).openConnection();
|
||||
connection.setConnectTimeout(60*1000);
|
||||
connection.setReadTimeout(60*1000);
|
||||
connection.setRequestProperty("User-Agent", getExtUa());
|
||||
|
Loading…
Reference in New Issue
Block a user