I was looking for an easy way to do a GET request given a URL, port and path. I came across this method which works fine but I started wondering why it is designed to be like this verbose. Why isn't it better for the URL class to provide a get() method that just does steps 2,3 and 4 behind the scenes?
URL url = new URL("http", host, port, path);
URLConnection conn = url.openConnection();
conn.setDoInput(true);
conn.connect();