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();
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE