Need to see how you are setting the params to have any idea of how to help.

My guess is that you are sending an invalid parameter and the server is refusing the connection because of that.

Sincerely,

Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://bgies.com
http://bistroblurb.com
http://ihottonight.com
http://forcethetruth.com
-----------------------------------------------------------------------

Everything in moderation, including abstinence

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead


On 10/10/2010 11:09 AM, dashman wrote:
in the following code - i get an http response code
400 - BAD REQUEST.

if i comment out the post.setEntity() line - then it
works fine - response code 200.

of course i've got internet permission

params is a list of 1 entry - string2string mapping.

         URI uri = new URI(urlPath);

         HttpPost post = new HttpPost(uri);

         UrlEncodedFormEntity entity = new UrlEncodedFormEntity(params,
"UTF-8");

         post.setEntity(entity);  // if this line is commented out -
the post results in status 200 OK

         DefaultHttpClient client = new DefaultHttpClient();

         HttpResponse res = client.execute(post);


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to