日期:2014-05-20 浏览次数:20623 次
// 打开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);