Class JerseyClientHelper


  • @Deprecated(since="2023.13",
                forRemoval=true)
    public final class JerseyClientHelper
    extends Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 2023.13, use HttpClientTestRule instead
    Helper for using the Jersey 1 Client.
    Since:
    9.3
    • Field Detail

      • DEFAULT_CONNECTION_TIMEOUT

        public static final int DEFAULT_CONNECTION_TIMEOUT
        Deprecated, for removal: This API element is subject to removal in a future version.
        See Also:
        Constant Field Values
      • DEFAULT_CLIENT

        public static final com.sun.jersey.api.client.Client DEFAULT_CLIENT
        Deprecated, for removal: This API element is subject to removal in a future version.
        Default instance of a Jersey 1 Client relying on the Apache HTTP client, DEFAULT_CONNECTION_TIMEOUT for the connection timeout parameters and no authentication.
    • Method Detail

      • clientBuilder

        public static JerseyClientHelper.ApacheHttpClientBuilder clientBuilder()
        Deprecated, for removal: This API element is subject to removal in a future version.
        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();