50,545
社区成员
发帖
与我相关
我的任务
分享
// 打开url连接
HttpURLConnection connection = (HttpURLConnection) urlPath.openConnection();
// 设置url请求方式 ‘get’ 或者 ‘post’
connection.setRequestMethod("POST");
// 发送
BufferedReader in = new BufferedReader(new InputStreamReader(
url.openStream()));
// 返回发送结果
String inputline = in.readLine();
//System.out.println(inputline);