blahNow私は、私のアプリでは、私のアプリでログインする必要があります... www.blah.com/api/login/username/passwordをANdroidのアプリケーションを実行しています。は、サイトにアンドロイドからデータを渡します
private void sendAccelerationData()
{
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(7);
nameValuePairs.add(new BasicNameValuePair("","test3"));
nameValuePairs.add(new BasicNameValuePair("","pass3"));
this.sendData(nameValuePairs);
}
private void sendData(ArrayList<NameValuePair> data)
{
try
{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new
HttpPost("http://blah.com/api/login/");
httppost.setEntity(new UrlEncodedFormEntity(data));
HttpResponse response = httpclient.execute(httppost);
}
}
が、私は
HttpPost("http://eesnap.com");
とsendAccelerationData(のように私のsendData()を書く場合、私はerror.and 404を取得しています)
nameValuePairs.add(new BasicNameValuePair("","api"));
nameValuePairs.add(new BasicNameValuePair("","login"));
nameValuePairs.add(new BasicNameValuePair("","test3"));
nameValuePairs.add(new BasicNameValuePair("","pass3"));
ように私は200人の成功を取得しています。 ブラウワーのポストwww.blah.com/api/login/username/passwordが、私は、ブラウザ上で結果を取得していた場合
http://eesnap.com/api/login/test3/pass3.Copy this url on addressbar ....確認できます – sarath