参考解答
1.生成请求对象(HttpGet get,HttpPost post)
2.生成客户端对象 HttpClient client
3.执行请求接收相应 HttpResponse response = client.execute(post)
HttpEntity entity = response.getEntity()
4.得到数据流
InputStream inputStream = entity.getContent();
5.最后关闭过期连接
相似问题
android中百度地图核心类及实现的功能是什么?
android中百度地图核心类及实现的功能是什么?
Android中的IPC机制是什么?
Android中的IPC机制是什么?
android用哪几种方式访问网络?
android用哪几种方式访问网络?
android如何实现消息推送?有哪些方式?各自的优缺点是什么?
android如何实现消息推送?有哪些方式?各自的优缺点是什么?
Android开发中如何实现一键退出?
Android开发中如何实现一键退出?
