Class HttpRequestUtils

java.lang.Object
com.ultikits.ultitools.utils.HttpRequestUtils

public class HttpRequestUtils extends Object
The UltiCloud base URL (env.yml api-url), read by the protocol 2.1.0 client.

The three protected protocol v1 REST calls this class kept for 6.3.0 subclasses were deprecated in 6.3.1 and removed in 6.4.0.

Since:
6.0.0
Author:
wisdomme
  • Field Details

    • baseUrl

      private static volatile String baseUrl
      Base URL for the API server (lazy initialized).
    • customBaseUrl

      private static String customBaseUrl
      Custom base URL for testing purposes.
  • Constructor Details

    • HttpRequestUtils

      public HttpRequestUtils()
  • Method Details

    • getBaseUrl

      static String getBaseUrl()
      Get the base URL for API calls. Uses lazy initialization to avoid requiring UltiTools at class loading time.
      Returns:
      the base URL
    • setBaseUrlForTesting

      static void setBaseUrlForTesting(String url)
      Set a custom base URL for testing purposes. This should only be used in unit tests.
      Parameters:
      url - the custom base URL, or null to reset to default
    • resetBaseUrl

      static void resetBaseUrl()
      Reset the base URL to force re-initialization. This should only be used in unit tests.