Package zowe.client.sdk.utility
Class RestUtils
- java.lang.Object
-
- zowe.client.sdk.utility.RestUtils
-
public final class RestUtils extends Object
Utility class for REST related static helper methods.- Version:
- 2.0
- Author:
- Frank Giordano
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResponsegetResponse(ZoweRequest request)Perform zowe rest request and retrieve its responsestatic booleanisHttpError(int statusCode)Checks if statusCode is an error http code or notstatic booleanisUrlNotValid(String url)Checks if url is a valid http or https url.
-
-
-
Method Detail
-
getResponse
public static Response getResponse(ZoweRequest request) throws Exception
Perform zowe rest request and retrieve its response- Parameters:
request- zowe request object- Returns:
- Response object
- Throws:
Exception- http error code
-
isHttpError
public static boolean isHttpError(int statusCode)
Checks if statusCode is an error http code or not- Parameters:
statusCode- http code value- Returns:
- boolean value
-
isUrlNotValid
public static boolean isUrlNotValid(String url)
Checks if url is a valid http or https url.- Parameters:
url- string value- Returns:
- boolean value
-
-