Greeting...
I am using android sdk1.0 release2 on windows XP to test
httpclient.execute(httppostmethod), but failed.
The compute connects to Internet w/o any problem.
Here is releated code
....
DefaultHttpClient client=new DefaultHttpClient()
try{
HttpPost method=new HttpPost("http://www.xyz.com") ;// a real website.
List<NameValuePair> data=new ArrayList<NameValuePair>;
data.add(new BasicNameValuepair("name1", "astring");
method.setEntity(new UrlEncodedFormEntity(data));
Log.i("test", "==1==");
HttpResponse response=client.execute(method);
Log.i("test", "==2==");
......
} catch(IOException e){
.....
}
.....
The code is compiled correctly, but failed at run.
it failed at the line: HttpResponse response=client.execute(method);
because I can see log: ==1==, not ==2==.
the error in log is: E/OSNetworkSystem(300): unknown socket error -1.
PS: when I run androidm5-r14 with httpclient3.x, it works fine with
aother window XP laptop on the same network. I do not think different
laptop with same window XP platform will make the difference. at
least, it should not.
Does android 1.o r2 has anyproblem running httpclient4 execute
httpost?
Thank you for any help or info.
Thank you!
Best Regards,
ever
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---