title: Connect to SAP Hana XS using http connection from JAVA
body: <p>I'm trying to figure out how to connect to Hana XS using http connection from java, I've spent days searching for anything relevant on internet but couldn't find anything.</p>
  
  <p>I was just trying a few thing and the best i could come up with is :</p>
  
  <pre><code>public static boolean testConnection(String host, String port,String userID,String certificate)
  {
      boolean success = false;
      String https_url = "https://"+host+":"+port;
      URL url ;
      try{
          url = new URL (https_url);
          HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
          con.setRequestMethod("GET");
          con.setRequestProperty("content-type", "application/x-www-form-urlencoded");
          con.setRequestProperty("Authorization", certificate);
          int response = con.getResponseCode();
          System.out.println("Response:  "+ response);
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
  
  
      return success;
  }
  </code></pre>
  
  <p>This Obviously is not working as i don't know how to form the connection string and send the request. 
  Any help will be appreciated. </p>