code: private InputStream downloadUrl(String myurl) throws IOException {
          InputStream is = null;
          // Only display the first 500 characters of the retrieved
          // web page content.
          try {
              URL url = new URL(myurl);
              HttpURLConnection conn = (HttpURLConnection) url.openConnection();
              conn.setReadTimeout(28000 /* milliseconds */);
              //set back to 15000, 10000
              conn.setConnectTimeout(30000 /* milliseconds */);
              conn.setRequestMethod("GET");
              conn.setDoInput(true);
              // Starts the query
              conn.connect();
              is = conn.getInputStream();
              return is;
          } finally {
              if (is != null) {
                  is.close();
              }
          }
      }
docs: Given a URL, establishes an HttpUrlConnection and retrieves
  the web page content as a InputStream, which it returns as
  a string.
  
  @param myurl The URL of the request
  @return The inputstream of the request's return data
  @throws IOException