我在Android中执行以下帖子:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.example.com");
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("account", "login"));
nameValuePairs.add(new BasicNameValuePair("email", "email@email.com));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
在服务器端,我返回cgi.request_method变量,它是GET 不应该是POST吗?我错过了什么吗?
答案 0 :(得分:0)
该代码应该启动POST,而不是GET。我猜想服务器端的某些内容配置错误。
答案 1 :(得分:-1)
我的问题是发送http而不是https