Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3021
  • 博文数量: 4
  • 博客积分: 91
  • 博客等级: 民兵
  • 技术积分: 50
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 10:13
文章分类
文章存档

2012年(1)

2011年(3)

我的朋友
最近访客

分类:

2011-03-08 22:41:54

public static int invokeHttpTest() throws Exception
{
URL url = new URL(

"企业ID&username=用户名"
+ "&userpwd=密码&handtel=手机号&sendcontent=内容限制为个字,小灵通个字"
+ "&sendtime=定时时间&smsnumber=所用平台");
HttpURLConnection httpCon = (HttpURLConnection) url.openConnection();
httpCon.connect();
BufferedReader in = new BufferedReader(new InputStreamReader(
httpCon.getInputStream()));
String line = in.readLine();
System.out.println("

     result:   "
+ line);
int i_ret = httpCon.getResponseCode();
String sRet = httpCon.getResponseMessage();
System.out.println("sRet   is:   " + sRet);
System.out.println("i_ret   is:   " + i_ret);
return 0;
}

56文档下载地址:

来源:
 
网址:
阅读(334) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~