I am trying to figure out how to make HTTP get requests. The following is what I have so far:
HttpGet get = new HttpGet("http://www.microsoft.com"); HttpClient client = new DefaultHttpClient(); HttpResponse response; try { response = client.execute(get); HttpEntity entity = response.getEntity(); InputStream stream = entity.getContent(); byte[] b = new byte[1000]; stream.read(b); } catch (ClientProtocolException e) { } catch (IOException e) { } This works fine, but what I really need is a way to read the data asynchronously. Is there some way to set up the transfer and specify a call back function which is called as the bytes come in, or do I need to create a thread to do this? 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