请求的代码是这样:
List<NameValuePair> list = new ArrayList<NameValuePair>();
list.add(new BasicNameValuePair("username", name));
list.add(new BasicNameValuePair("password", pwd));
HttpPost httpPost = new HttpPost(url);
httpPost.setEntity(new UrlEncodedFormEntity(
list,"UTF-8"));
HttpClient httpClient = new DefaultHttpClient();
HttpResponse response = httpClient.execute(httpPost);
php那边总是获取不到post传过去的参数,抓取消息打印的信息里有个“REQUEST__METHOD”=“GET”, 明明发的post为什么PHP服务那边打印出来的是GET?
有人遇到同样的问题吗, 怎么解决?