Search in sources :

Example 1 with BrowserCacheFeature

use of org.jboss.resteasy.client.jaxrs.cache.BrowserCacheFeature in project muikku by otavanopisto.

the class ClientPool method buildClient.

private Client buildClient() {
    // TODO: trust all only on development environment
    ClientBuilder clientBuilder = ClientBuilder.newBuilder();
    if ("development".equals(System.getProperties().getProperty("system.environment"))) {
        clientBuilder = trustSelfSignedCerts(clientBuilder);
    }
    ClientBuilder builder = clientBuilder.register(new JacksonConfigurator()).register(new BrowserCacheFeature());
    return builder.build();
}
Also used : BrowserCacheFeature(org.jboss.resteasy.client.jaxrs.cache.BrowserCacheFeature) ClientBuilder(javax.ws.rs.client.ClientBuilder)

Aggregations

ClientBuilder (javax.ws.rs.client.ClientBuilder)1 BrowserCacheFeature (org.jboss.resteasy.client.jaxrs.cache.BrowserCacheFeature)1