client = createHttpClient();
}
private Client createHttpClient() {
ClientConfig clientConfig = new ClientConfig()
.register(new JacksonFeature())
.connectorProvider(new ApacheConnectorProvider());
if (Boolean.parseBoolean(System.getProperty("proxySet"))) {
clientConfig.property(ClientProperties.PROXY_URI, "http://" + System.getProperty("http.proxyHost") + ":" + System.getProperty("http.proxyPort"));
}
return ClientBuilder.newClient(clientConfig);