Class JerseyClientHelper

    • Method Detail

      • clientBuilder

        public static JerseyClientHelper.ApacheHttpClientBuilder clientBuilder()
        Allows to build a custom instance of a Jersey 1 Client relying on the Apache HTTP client.

        For instance, you can set the connection timeout and credentials for basic authentication by calling:

         
             Client client = JerseyClientHelper.clientBuilder()
                                               .setConnectTimeout(5000)
                                               .setCredentials("joe", "password")
                                               .build();