80,351
社区成员
发帖
与我相关
我的任务
分享
InputStream is;
try{
HttpClient httpclient=new DefaultHttpClient();
HttpPost httppost=new HttpPost("http://110.86.69.250/getAllPeopleBornAfter.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response =httpclient.execute(httppost);
HttpEntity entity=response.getEntity();
is=entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection" + e.toString());
}
try{
BufferedReader reader=new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb=new StringBuilder();
String line =null;
while((line=reader.readLine())!=null){
sb.append(line+"\n");
}
is.close();
result=sb.toString();
}catch(Exception e){
Log.e("log_tag","Error converting result" + e.toString());
}
try{
HttpClient httpclient=new DefaultHttpClient();
HttpPost httppost=new HttpPost("http://110.86.69.250/getAllPeopleBornAfter.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response =httpclient.execute(httppost);
HttpEntity entity=response.getEntity();
InputStream is=entity.getContent();
BufferedReader reader=new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb=new StringBuilder();
String line =null;
while((line=reader.readLine())!=null){
sb.append(line+"\n");
}
is.close();
result=sb.toString();
}catch(Exception e){
Log.e("log_tag", "Error in http connection" + e.toString());
}