Support Forums

Full Version: Help With HttpConnection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been trying to get this working for some time now and it just don't seem to work.

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/
gOOGLE get this working for some time now and it just don't seem to work.

AdilahBisar

i want to ask something please help me????????