分类: 系统运维
2010-09-26 10:41:49
param 为aaa=111&bbb=222.....格式 import java.io.*; import java.net.*; public class TestGetPost{ //发送带参数的GET请求 public static String sendGet(String url,String param) { String result = ""; try{ String urlName = url + "?"+param; URL U = new URL(urlName); URLConnection connection = U.openConnection(); connection.connect(); |
chinaunix网友2010-09-27 11:05:28
很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com