谁有调用过第三方的接口经验的 来看看? http://trac.meyoung.cn/Trac/wiki/public/mefp#%E7%A4%BA%E4%BE%8B%E7%A8%8B%E5%BA%8F谁给看看这个接口 怎么调用啊我有测试用的帐号和keyQQ:107566186 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public static String getResponseData(String url) throws Exception{ URL dataUrl = null; String data = null; try { dataUrl = new URL(url); } catch (MalformedURLException e1) { e1.printStackTrace(); } HttpURLConnection con = null; try { con = (HttpURLConnection) dataUrl.openConnection(); } catch (IOException e) { e.printStackTrace(); } con.setRequestMethod("GET"); con.setRequestProperty("Proxy-Connection", "Keep-Alive"); con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); con.setRequestProperty("Charset", "utf-8"); con.setDoOutput(true); con.setDoInput(true); BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8")); String line = ""; String result = ""; while(null != (line=br.readLine())){ result += line; } return result; }给你提供下参考 BufferReader应该可以吧!最近接触了几个调用短信接口的问题,感觉你这应该也差不多吧! 相当于你给他拼一个url,一个url怎么带参数这些就不用再说了吧,然后就是看你怎么去打开这个url,你可以用httpclient,也可以用别的方式,请求以后会像你打开浏览器中的链接一样给你返回一个页面的东西,但这里可能是json数据格式可能是xml文件格式等等,然后你去解析这个格式 使用httpclient就行了,网上多得很对实例 servlet连接数据库 spring中使用quartz任务时,jobDataAsMap问题。 求教AJAX参数问题 jsp:usebean不能接收当前页的form 急:有关FCKeditor自动换行的问题! jsp中调用存储过程返回结果集能不能做分页? 如何在JSP中使用SQL SERVER啊? 应届毕业生大家来讨论讨论收入的问题? 怎样用tomcat发布做好的网站,急 两个问题,在线等 网站打开后页面直接跳成。。内容如下 java web 学习,从哪开始,求指导
URL dataUrl = null;
String data = null;
try {
dataUrl = new URL(url);
} catch (MalformedURLException e1) {
e1.printStackTrace();
}
HttpURLConnection con = null;
try {
con = (HttpURLConnection) dataUrl.openConnection();
} catch (IOException e) {
e.printStackTrace();
}
con.setRequestMethod("GET");
con.setRequestProperty("Proxy-Connection", "Keep-Alive");
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setRequestProperty("Charset", "utf-8");
con.setDoOutput(true);
con.setDoInput(true);
BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));
String line = "";
String result = "";
while(null != (line=br.readLine())){
result += line;
}
return result;
}
给你提供下参考