Android HTTP exception
<p>I am using following code to log in to Dropbox, but it throws an exception.</p>

<p>Code:</p>

<pre><code>    HttpClient client = new DefaultHttpClient();
    HttpPost post = new HttpPost("https://www.dropbox.com/login");

    // set values you'd like to send
    List pairs = new ArrayList();
    pairs.add(new BasicNameValuePair("login_email", "my email id"));
    pairs.add(new BasicNameValuePair("login_password", "******"));
    /*'login_email' and 'login_password' i found html form fields name by viewing the page source of https://www.dropbox.com/login */

    try {
        post.setEntity(new UrlEncodedFormEntity(pairs));
        // set ResponseHandler to handle String responses
        ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler();
        String response = client.execute(post, responseHandler);
        Log.v("HttpPost", "Response: " + response);
        if (response.contains("SUCCESS")){
            // express your joy here!
        } else {
            // pop a sad Toast message here...
        }
    } catch (Exception e) {
        Log.e("", String.valueOf(e));
    }
}
</code></pre>

<p>Logcat</p>

<pre><code>         11-14 23:17:35.734: E/Trace(900): error opening trace file: No such file or directory (2)
         11-14 23:17:38.793: D/dalvikvm(900): GC_CONCURRENT freed 251K, 4% free 8194K/8519K, paused 126ms+9ms, total 234ms
         11-14 23:17:39.895: E/(900): org.apache.http.client.HttpResponseException: Forbidden
         11-14 23:17:40.364: I/Choreographer(900): Skipped 75 frames!  The application may be doing too much work on its main thread.
         11-14 23:17:40.394: D/gralloc_goldfish(900): Emulator without GPU emulation detected.
         11-14 23:17:40.784: I/Choreographer(900): Skipped 62 frames!  The application may be doing too much work on its main thread.
         11-14 23:17:43.614: W/chromium(900): external/chromium/net/disk_cache/backend_impl.cc:1829: [1114/231743:WARNING:backend_impl.cc(1829)] Destroying invalid entry.
</code></pre>
