Habitat habitat = SecurityServicesUtil.getInstance().getHabitat();
SecureAdmin secureAdmin = habitat.getComponent(SecureAdmin.class);
HTTPSProperties httpsProperties = new HTTPSProperties(new BasicHostnameVerifier(),
habitat.getComponent(SSLUtils.class).getAdminSSLContext(SecureAdmin.Util.DASAlias(secureAdmin), null ));
client.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, httpsProperties);
client.addFilter(new CsrfProtectionFilter());
}catch(Exception ex){
GuiUtil.getLogger().warning("RestUtil.initialize() failed");
if (GuiUtil.getLogger().isLoggable(Level.FINE)){
ex.printStackTrace();
}