HttpClient httpclient; HttpPost httppost; HttpResponse response; httppost = new HttpPost(“website-url-goes-here”); try { response = httpclient.execute(httppost); HttpEntity entity1 = response.getEntity(); InputStream is = entity1.getContent(); String w1url = convertStreamToString(is); } catch (ClientProtocolException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } Add function into a class …
HttpResponse to String android
