/** * Setup the HTTP Connection for use. This does not obtain a status code * or any messages from the remote endpoint, it will only establish a * connection to use. * * @return The HTTPURLConneciton instance. * @throws IOException Any connectivity issues. */ private HttpURLConnection connect() throws IOException { final HttpURLConnection connection = (HttpURLConnection) remoteURL.openConnection(); if (connection instanceof HttpsURLConnection) { final HttpsURLConnection sslConn = (HttpsURLConnection) connection; initHTTPS(sslConn); } setRequestSSOCookie(connection); connection.setRequestMethod("DELETE"); connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(false); return connection; } }