修复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) {
|
public static String https_get(String url, Map<String, String> header) {
|
||||||
try {
|
try {
|
||||||
HttpsURLConnection connection;
|
URLConnection connection;
|
||||||
connection = (HttpsURLConnection) new URL(url).openConnection();
|
connection = new URL(url).openConnection();
|
||||||
connection.setConnectTimeout(60*1000);
|
connection.setConnectTimeout(60*1000);
|
||||||
connection.setReadTimeout(60*1000);
|
connection.setReadTimeout(60*1000);
|
||||||
connection.setRequestProperty("User-Agent", getExtUa());
|
connection.setRequestProperty("User-Agent", getExtUa());
|
||||||
|
Loading…
Reference in New Issue
Block a user