Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static DefaultHttpClient httpClient;
- URL url=new URL(urlToHit);
- LoginScreen.httpClient = new DefaultHttpClient(); //LoginScreen is the name of the current Activity
- HttpPost httppost = new HttpPost(url.toString());
- HttpResponse response = LoginScreen.httpClient.execute(httppost);
- xr.parse(new InputSource(url.openStream())); //SAX parsing
- URL url=new URL(urlToHit);
- HttpPost httppost = new HttpPost(url.toString());
- HttpResponse response = LoginScreen.httpClient.execute(httppost);
- // Log.v("response code",""+response.getStatusLine().getStatusCode());
- // Get hold of the response entity
- HttpEntity entity = response.getEntity();
- InputStream instream = null;
- if (entity != null) {
- instream = entity.getContent();
- }
- xr.parse(new InputSource(instream)); //SAX parsing
Add Comment
Please, Sign In to add comment