protected Map<String,String> doRequest(String httpsURL,String requestMethod,OAuthParameters oparams,String body){
  if (privateKey == null) {
    throw new MCApiRuntimeException(new UnrecoverableKeyException(NULL_PRIVATEKEY_ERROR_MESSAGE));
  }
  if (body != null && body.length() > 0) {
    oparams=setOauthBodyHashParameter(body,oparams);
  }
  HttpsURLConnection con=null;
  try {
    con=setupConnection(httpsURL,requestMethod,oparams,body);
    con.connect();
    if (body != null) {
      writeBodyToConnection(body,con);
    }
    return checkForErrorsAndReturnResponse(con);
  }
 catch (  IOException e) {
    throw new MCApiRuntimeException(e);
  }
 finally {
    if (con != null) {
      con.disconnect();
    }
  }
}

protected Map < String , String > doRequest ( String httpsURL , String requestMethod , OAuthParameters oparams , String body ) { if ( privateKey == null ) { throw new MCApiRuntimeException ( new UnrecoverableKeyException ( NULL_PRIVATEKEY_ERROR_MESSAGE ) ) ; } if ( body != null && body . length ( ) > 0 ) { oparams = setOauthBodyHashParameter ( body , oparams ) ; } HttpsURLConnection con = null ; try { con = setupConnection ( httpsURL , requestMethod , oparams , body ) ; con . connect ( ) ; if ( body != null ) { writeBodyToConnection ( body , con ) ; } return checkForErrorsAndReturnResponse ( con ) ; } catch ( IOException e ) { throw new MCApiRuntimeException ( e ) ; } finally { if ( con != null ) { con . disconnect ( ) ; } } }
establish an oauth connection to openapi over https .
