Package com.ultikits.ultitools.utils
Class HttpRequestUtils
java.lang.Object
com.ultikits.ultitools.utils.HttpRequestUtils
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static StringGet the base URL for API calls.(package private) static voidReset the base URL to force re-initialization.(package private) static voidSet a custom base URL for testing purposes.
-
Field Details
-
baseUrl
Base URL for the API server (lazy initialized). -
customBaseUrl
Custom base URL for testing purposes.
-
-
Constructor Details
-
HttpRequestUtils
public HttpRequestUtils()
-
-
Method Details
-
getBaseUrl
Get the base URL for API calls. Uses lazy initialization to avoid requiring UltiTools at class loading time.- Returns:
- the base URL
-
setBaseUrlForTesting
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.
-