Hi.

I came across IOException when i do post:
httpclient.execute(httppost);!
The following is part of my codes:

JSONObject json = new JSONObject();
                json.put("username", "XXXX");
                json.put("PhoneType", "XXXXX");
                StringEntity se = new StringEntity(json.toString());
                se.setContentEncoding(new
BasicHeader(HTTP.CONTENT_TYPE,"application/json"));
            httppost.setEntity(se);
            HttpResponse response = httpclient.execute(httppost);

i'm just trying to connect to a certain server, so that he can send me
back some JSON format information.

Could you please tell me what cause the IOException?

Thanks.

-- 
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