Little modification
HttpGet httpget = new HttpGet("http://10.91.28.203");
// Execute the request
HttpResponse response = null;
try {
System.out.println("inside try 1");
response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();
if(entity!=null)
{
BufferedReader reader = new BufferedReader(new
InputStreamReader(response.getEntity().getContent(), "UTF-8"));
StringBuilder builder = new StringBuilder();
for (String line = null; (line = reader.readLine()) !=
null;)
{
builder.append(line).append("\n");
}
JSONTokener tokener = new JSONTokener(builder.toString());
JSONArray finalResult = new JSONArray(tokener);
}
On May 18, 2:58 pm, Rocky <[email protected]> wrote:
> Hi my code (red colored) is not responding, saying that time out,
> please let me know where i'm doing wrong.
>
> // Prepare a request object
> HttpGet httpget = new HttpGet("http://10.91.28.203");
>
> // Execute the request
> HttpResponse response = null;
>
> JSONObject json = new JSONObject();
> System.out.println("result = " + result);
> System.out.println("json object " + json.toString());
>
> try {
> System.out.println("inside try 1");
> response = httpclient.execute(httpget);
>
> --
> Thanks & Regards
>
> Rakesh Kumar Jha
--
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