Code example for HttpsURLConnection

Methods: disconnect

0
 
    public void disconnect() { 
        try { 
            URL url = new URL(PROTOCOL + host);
            HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
            connection.disconnect();
        } catch (MalformedURLException e) {
            // Nothing 
        } catch (IOException e) {
            // Nothing 
        } finally { 
            this.state = SessionState.DISCONNECTED;
            this.cookieMap.clear();
            this.requestUrl = null;
            this.host = null;
            LOGGER.info("DISCONNECTED!"); 
        } 
    } 
 
    private HttpsURLConnection getConnection(String path) throws IOException {