摘要: package com.test.threadtest1;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.app.Activity;import android.a... 阅读全文
posted @ 2013-01-24 11:31 小蚊子子 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 本程序介绍如何通过HttpClient模块来创建Http连接,并分别以Http Get和Post方法传递参数,连接之后取回web server的返回网页结果。 注意,在用Post时,传递变量必须用NameValuePais[]数组存储,通过HttpRequest.setEntity()方法来发出http请求。 此外,也必须通过DefaultHttpClient().execute(httpRequest)添加HttpRequest对象来接收web server的回复,在通过httpResponse.getEntity()取出回复信息。/*必需引用apache.http相关类别来建立HTTP联机 阅读全文
posted @ 2013-01-24 10:44 小蚊子子 阅读(856) 评论(0) 推荐(0) 编辑