假设我有这个
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("pin", "date"));
当我使用下面的代码时
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://X.X.X.X/abcdef.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
什么将是邮政的要求? 参数如何在URL中传递?
找到答案可参考此链接以了解更多详细信息
参数以如下方式传递
http://localhost/xyz.php?pin=date&package=123&requirements=xxx&last_date=25%20april