title: HttpURLConnection GET request not returning anything
body: <p>I am trying to execute a GET request, however even though there is no error in the log, the request returns nothing. </p>
  
  <pre><code>    new Thread(new Runnable() {
          @Override
          public void run() {
              try {
                  Log.v("info", "get request starting"); //This message is showing in the console
                  URL url = new URL("http://192.168.0.16:8888/piapi/index.php/piapi/getinfo");
                  HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
                  urlConnection.setRequestMethod("GET");
                  urlConnection.setRequestProperty("User-Agent", "Mozilla/5.0");
                  InputStream stream = urlConnection.getInputStream();
                  InputStreamReader reader = new InputStreamReader(stream);
                  BufferedReader bufferedReader = new BufferedReader(reader);
                  String line;
                  Log.v("info", "Request executed"); //This is not showing
                  while ((line = bufferedReader.readLine()) != null) {
                      System.out.println(line); // Doesn't show anything
                  }
                  bufferedReader.close();
              } catch (MalformedURLException e) {
                  e.printStackTrace();  
              } catch (IOException e) {    //No error in the log file
                  e.printStackTrace();
              }
          }
      }).start();
  </code></pre>
  
  <p>I have also tried to put it in a Asynctask class, and with several URLs but none of these options worked. Any suggestion ? Thanks.</p>