9 Android Client get 登录方式
来源:互联网 发布:高级有限元分析软件 编辑:程序博客网 时间:2024/05/20 10:56
/** client get 登录方式 * 采用HttpClient get 提交数据 * @param usename * @param password * @return 返回null 登录异常 * @throws Exception */public static String loginByClientGet(String usename,String password){try{//1. 打开一个浏览器HttpClient clien=new DefaultHttpClient();//2、 输入地址String path="http://192.1.100::8080/web/LoginServlet?username="+URLEncoder.encode(usename)+"&password"+URLEncoder.encode(password);HttpGet httpGet=new HttpGet(path);//3.敲回车HttpResponse response=clien.execute(httpGet);int code=response.getStatusLine().getStatusCode();if(code==200){InputStream is=response.getEntity().getContent();//String text=StreamTools.readInputStrams(is);return ""+"text";}else{return null;} } catch(Exception e) { e.printStackTrace(); }}}
0 0
- 9 Android Client get 登录方式
- Android Get方式网络请求
- android网络请求get方式
- android+-+MapView+couldn't+get+connection+from+fatory+client问题
- Android Exception MapActivity: Couldn't get connection factory client
- Android调用GoogleMap出现Couldn't get connection factory client
- Android HTTP Client: GET, POST, Download, Upload, Multipart Request
- 关于android登录get路径问题
- 利用GET方式实现Web登录认证的MIDLET
- javascript解决单点登录(get或post方式)
- go client get/post
- Android互联网访问,get方式,post方式等方式
- Android通过GET方式访问网络页面
- android Http通信之get方式
- android使用get方式访问服务器
- Android Get&Post方式区别与选择
- Android使用get方式上传数据
- Android中"get","post" 最新请求方式
- 《变革2014:极度智能的手表和可穿戴电视》
- VMware技术大讲堂-虚拟机克隆
- mysql索引背后的数据结构及算法
- VMware技术大讲堂- vCAC快速部署应用
- VMware技术大讲堂-vSphere Replication
- 9 Android Client get 登录方式
- 黑马程程序员--javaSE--javaIO流
- 提取并生成文件夹下所有目录和文件名
- LeetCode - Two Sum
- DARPA慷慨解囊的背后:Python与大数据的火花
- iOS网络通信http之NSURLConnection
- 11-EL表达式判断值是否为空
- Java字符串——startWith endWith
- Web自动化测试中的接口测试