HttpClient httpClient = new DefaultHttpClient();
GET 請求
HttpGet httpGet = new HttpGet(https://www.ietf.org/rfc/rfc2616.txt");
httpClient.execute(httpGet)
POST 請求
HttpPost httpPost = new HttpPost("https://www.ietf.org/rfc/rfc2616.txt"");
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("username","admin"));
params.add(new BasicNameValuePair("password","123456"));
UrlEncodedFormEntity entity = new UrlEncodedFormEntity("params","uft-8");