HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
try {
httppost.setHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4);
nameValuePairs.add(new BasicNameValuePair("*", *));
nameValuePairs.add(new BasicNameValuePair("*", *));
nameValuePairs.add(new BasicNameValuePair("*", *));
nameValuePairs.add(new BasicNameValuePair("*", *));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs,HTTP.UTF_8));
HttpResponse response;
String result = null;
response = httpclient.execute(httppost);
if (response.getStatusLine().getStatusCode() == 200) {
HttpEntity entity = response.getEntity();
result = EntityUtils.toString(entity, HTTP.UTF_8);
}
Log.i(TAG, "result:" + result);
return result;
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}