I'm trying to request for HTTP but it's dying on me on
HttpResponse httpResponse = httpClient.execute(httpGet);
Below is my code...
public JSONObject getJSONFromUrl(String url) {
// HTTP Request
try {
// defaultHttpClient
System.out.println("CRAZY1");
HttpClient httpClient = new DefaultHttpClient();
System.out.println("CRAZY2");
HttpGet httpGet = new HttpGet(url);
System.out.println("CRAZY3");
System.out.println("CRAZY4");
HttpResponse httpResponse = httpClient.execute(httpGet);
System.out.println("CRAZY5");
HttpEntity httpEntity = httpResponse.getEntity();
System.out.println("CRAZY6");
is = httpEntity.getContent();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
It's telling me thread is exiting with uncaught exception. I do have permissions enabled in the manifest. What could be the problem?