Example usage for javax.net.ssl HttpsURLConnection getDoOutput

List of usage examples for javax.net.ssl HttpsURLConnection getDoOutput

Introduction

In this page you can find the example usage for javax.net.ssl HttpsURLConnection getDoOutput.

Prototype

public boolean getDoOutput() 

Source Link

Document

Returns the value of this URLConnection 's doOutput flag.

Usage

From source file:org.ejbca.core.protocol.ws.CommonEjbcaWS.java

/** Return a HttpsURLConnection for a GET, using client certificate authentication to the url. The url should be EJBCA client protected https port, i.e. 8443
 * @param url the URL to connect to, i.e. https://localhost:8443/ejbca/adminweb/index.jsp
 *///w w  w  . j  av a2 s . c o m
protected HttpURLConnection getHttpsURLConnection(String url) throws IOException, UnrecoverableKeyException,
        KeyManagementException, NoSuchAlgorithmException, KeyStoreException, CertificateException {
    final HttpsURLConnection con;
    URL u = new URL(url);
    con = (HttpsURLConnection) u.openConnection();
    con.setHostnameVerifier(new SimpleVerifier());
    con.setSSLSocketFactory(getSSLFactory());
    con.setRequestMethod("GET");
    con.getDoOutput();
    con.connect();
    return con;
}