URL url = new URL("http://example-url"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); return con.getResponseMessage().toString()