07-19-2012, 09:33 AM
I have been trying to get this working for some time now and it just don't seem to work.
I get the following error.
Code:
public void sendRequest(String request_url){
try {
URL url = new URL(request_url);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.connect();
InputStream in = conn.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String text = reader.readLine();
Logger.log(this, "Error " + text);
conn.disconnect();
} catch (Exception e) {
Logger.log(this, "Error " + e.toString());
}
}
I get the following error.
Code:
java io.FileNotFoundException : http://runegalaxy.org/Hs/