//getPDAServerData method name? Parameter url does not return a value.
url+= "? User name = Zhang San ";
//Add "? User name = Zhang San "
HttpClient? Client = New? default http client();
//create an HttpClient object
HttpPost? Request;
//create HttpPost? target
Try it? {
Request? =? New? HttpPost (new? URI (web address));
//Create an httppost request
HttpResponse? Response=client.execute (request);
//Send an htttpost request? Get that response that return the result.
if(response.getStatusLine()。 getStatusCode()==200){
//200 If the returned result is stateful, it will be successful? Execution will continue after the judgment is successful.
HttpEntity? entity = response . get entity();
//Get the returned result
If (entity! =null){
//If the returned result is not empty
String? Out = entitutils. tostring (entity);
//Convert the returned result into a string format.
New? Alert dialog box. The builder (this). setMessage(out)。 Create (). show();
//Create an alert dialog box, display the returned results, and then display?
}?
}
} catch? (URISyntaxException? e)? {
//Abnormal? These are exceptions, and http requests may cause errors.
e . printstacktrace();
}? Catch? (ClientProtocolException? e)? {
e . printstacktrace();
}? Catch? (IOException? e)? {
e . printstacktrace();
}