pass data to a site from android
<p>blahNow I am doing an ANdroid application.In my app I have to login using a url.Just like...www.blah.com/api/login/username/password.</p>

<pre><code>private void sendAccelerationData()
{
    ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(7);
    nameValuePairs.add(new BasicNameValuePair("","test3"));
    nameValuePairs.add(new BasicNameValuePair("","pass3"));
    this.sendData(nameValuePairs);
}

private void sendData(ArrayList&lt;NameValuePair&gt; 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);
    }
}
</code></pre>

<p>but I am getting 404 error.and if i write my sendData() like </p>

<pre><code>HttpPost("http://eesnap.com");
</code></pre>

<p>and sendAccelerationData() like</p>

<pre><code>nameValuePairs.add(new BasicNameValuePair("","api"));
nameValuePairs.add(new BasicNameValuePair("","login"));
nameValuePairs.add(new BasicNameValuePair("","test3"));
nameValuePairs.add(new BasicNameValuePair("","pass3"));
</code></pre>

<p>I am getting 200 success.
If post www.blah.com/api/login/username/password on brower then I am getting a result on the browser</p>
