Package com.morpheusdata.core.util
Class RestApiUtil
java.lang.Object
com.morpheusdata.core.util.RestApiUtil
Deprecated.
Utility methods for calling external APIs in a standardized way.
- Since:
- 0.8.0
This utility is deprecated. Use
HttpApiClientwhich is more efficient for API communications.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.static interfaceDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.static ServiceResponseDeprecated.static ServiceResponseDeprecated.static ServiceResponsecallApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) Deprecated.static ServiceResponsecallJsonApi(String url, String path) Deprecated.static ServiceResponsecallJsonApi(String url, String path, RestApiUtil.RestOptions opts) Deprecated.static ServiceResponsecallJsonApi(String url, String path, RestApiUtil.RestOptions opts, String method) Deprecated.static ServiceResponsecallJsonApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts) Deprecated.static ServiceResponsecallJsonApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) Deprecated.static ServiceResponsecallXmlApi(String url, String path, RestApiUtil.RestOptions opts) Deprecated.static ServiceResponsecallXmlApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) Deprecated.static voidshutdownClient(org.apache.http.client.HttpClient httpClient) Deprecated.Wrapper method for shutting down an HttpClient connection Manager This is typically used when using a Keep-Alive connection managerstatic voidshutdownClient(org.apache.http.conn.HttpClientConnectionManager connectionManager) Deprecated.
-
Constructor Details
-
RestApiUtil
public RestApiUtil()Deprecated.
-
-
Method Details
-
callApi
public static ServiceResponse callApi(String url, String path, String username, String password) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callApi
public static ServiceResponse callApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callApi
public static ServiceResponse callApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callJsonApi
public static ServiceResponse callJsonApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callXmlApi
public static ServiceResponse callXmlApi(String url, String path, RestApiUtil.RestOptions opts) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
callXmlApi
public static ServiceResponse callXmlApi(String url, String path, String username, String password, RestApiUtil.RestOptions opts, String method) throws URISyntaxException, Exception Deprecated.- Throws:
URISyntaxExceptionException
-
addRequiredHeader
public static Map<String,String> addRequiredHeader(Map<String, String> headers, String name, String value) Deprecated. -
shutdownClient
public static void shutdownClient(org.apache.http.client.HttpClient httpClient) Deprecated.Wrapper method for shutting down an HttpClient connection Manager This is typically used when using a Keep-Alive connection manager- Parameters:
httpClient- the HttpClient we wish to permanently shutdown.
-
shutdownClient
public static void shutdownClient(org.apache.http.conn.HttpClientConnectionManager connectionManager) Deprecated.
-