|
@@ -76,32 +76,4 @@ public class HttpRequestUtil {
|
|
|
}
|
|
|
return jsonObject;
|
|
|
}
|
|
|
-
|
|
|
- /***
|
|
|
- * 获取请求路径返回结果
|
|
|
- * @param urlStr 路径
|
|
|
- * @return JSONObject
|
|
|
- */
|
|
|
-// private static JSONObject getUrlData(String urlStr){
|
|
|
-// JSONObject jsonObject = null;
|
|
|
-// BufferedReader bufferedReader = null;
|
|
|
-// try {
|
|
|
-// URL url = new URL(urlStr);
|
|
|
-// //创建连接
|
|
|
-// HttpsURLConnection httpsURLConnection = (HttpsURLConnection)url.openConnection();
|
|
|
-// StringBuilder result = new StringBuilder();
|
|
|
-// httpsURLConnection.connect();
|
|
|
-// bufferedReader = new BufferedReader(new InputStreamReader(httpsURLConnection.getInputStream(), "UTF-8"));
|
|
|
-// String line;
|
|
|
-// while (null != (line = bufferedReader.readLine())){
|
|
|
-// result.append(line);
|
|
|
-// }
|
|
|
-// jsonObject = JSONObject.fromObject(result.toString());
|
|
|
-// } catch (MalformedURLException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// } catch (IOException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// return jsonObject;
|
|
|
-// }
|
|
|
}
|