Code example for URLConnection

Methods: connect

0
     */ 
    public void testConnectionCreation() throws IOException { 
        URL url = new URL(URL_NAME);
        Log.d("ConnectivityTest", "creating HTTP connection to google.com.");
        URLConnection connection = url.openConnection();
        connection.connect();
    } 
 
}