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) |