修复http连接问题

This commit is contained in:
Yutousama 2021-11-06 14:15:27 +08:00
parent cb708d5e44
commit c2098ec827

View File

@ -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());