Android 使用URLConnection提交请求
来源:互联网 发布:淘宝350模板 编辑:程序博客网 时间:2024/06/05 11:20
new Thread(new Runnable() { @Override public void run() { String result = " "; BufferedReader bufferedReader; try { URL url = new URL("http://csdnimg.cn/pubfooter/js/repoAddr2.js?v=0.8046029126271605"); URLConnection urlConnection = url.openConnection(); // 不确定有什么用,以后再说 //urlConnection.setRequestProperty("accept", "*/*"); urlConnection.connect(); Map<String, List<String>> map = urlConnection.getHeaderFields(); for (String key : map.keySet()) { Log.e("URLConnectionTag", key + "->" + map.get(key)); } bufferedReader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); String line; result = ""; while ((line = bufferedReader.readLine()) != null) { result += line + "\n"; } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }).start();
0 0
- Android 使用URLConnection提交请求
- Android 使用URLConnection提交请求
- 使用URLConnection提交请求
- 使用 URLConnection提交请求
- Android 网络编程(3)——使用URLConnection提交请求
- Android移动开发-使用URLConnection提交请求的实现
- URLConnection 提交请求
- Android 网络:使用URLConnection提交请求,获取html代码加载WebView
- android网络应用URLConnection提交请求GET和POST
- android urlconnection get请求异常
- 使用URLConnection处理http请求
- 使用URLConnection处理http请求
- 使用URLConnection进行http请求
- 使用URLConnection做网络请求
- 使用URLConnection实现post表单提交
- 如何使用URLConnection处理http请求
- java 使用URLConnection发送 http 请求
- 使用URLConnection发送GET和POST请求
- C++使用CriticalSection实现线程同步
- WCF客户端的调用
- shell 同时运行脚本里多个互不干扰的指令
- 关系/对象映射 多对多关系(@ManyToMany 注释)【重新认识】
- 中国婆婆流泪自述:娶了个洋媳妇, 全家人生活巨变
- Android 使用URLConnection提交请求
- Java程序性能调优的基本知识和JDK调优
- 安卓 焦点获取和view放大问题(机顶盒应用)
- do...while(0)的妙用
- 网络编程socket之connect函数
- JDT的resolveBinding()问题的解决方案
- Android5.0系统WIFI状态如何向应用程序通知
- Android应用开发相关下载资源
- python输出htmltestrunner中文乱码如何解决